Jump to content

[WONTFIX] uninitialized variables in Body.cpp


photo

Recommended Posts

Hi,

 

I ran valgrind on my program and on the examples and noticed that Body reads/writes uninitialized variables. Please use this fix:

 

diff -r b676a66215cc -r a2eaebe397cf source/engine/physics/bodies/Body.cpp
--- a/source/engine/physics/bodies/Body.cpp     Thu Oct 02 08:43:11 2014 +0200
+++ b/source/engine/physics/bodies/Body.cpp     Tue Oct 07 10:32:51 2014 +0200
@@ -57,7 +57,7 @@
 
 /*
  */
-Body::Body(int type) : Instance<Body>(this), object(NULL), type(type), frame(-1), parent(NULL) {
+Body::Body(int type) : Instance<Body>(this), object(NULL), type(type), enabled(1), frozen(0), gravity(1), physical_mask(1), frame(-1), parent(NULL) {
 

 

 

Best regards,

Jorrit

 

Link to comment

Hi Jorrit,

 

Just got responce from the developers. I'm afraid this is correct behavior and application works as expected. Unfortunately, your patch would not be applied. If I will have more information about this issue I will surely update this topic later.

 

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...