Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-11 14:03:25 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-11 14:03:25 +0400
commit47068e88fba5b8a79ae8a9a09dadac684869faa6 (patch)
tree3b805ab87ac51af42a02d02cd6fcbe918ce9c740 /source/gameengine/GameLogic
parentf5df1601d6c6d03377f30f3787b964cab71ec3e0 (diff)
BGE: fix for 2 uses of uninitialized memory - property-sensor and object-color for materials.
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index ced3b8418fe..f02ac495233 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -152,13 +152,11 @@ bool SCA_PropertySensor::CheckPropertyCondition()
*/
if (result==false && dynamic_cast<CFloatValue *>(orgprop) != NULL) {
float f;
-
- if (EOF == sscanf(m_checkpropval.ReadPtr(), "%f", &f))
- {
- //error
+ if (sscanf(m_checkpropval.ReadPtr(), "%f", &f) == 1) {
+ result = (f == ((CFloatValue *)orgprop)->GetFloat());
}
else {
- result = (f == ((CFloatValue *)orgprop)->GetFloat());
+ /* error */
}
}
/* end patch */