Skip to content
Permalink
Browse files
Initialize all members in Interval constructor.
Fixes memory conditional jumps depending on uninitialized values
and as a consequence the unstable results from qgis_expressiontest

Closes #6877
  • Loading branch information
Sandro Santilli committed Dec 14, 2012
1 parent 677095f commit bd00b0f3f61849bc9dbf8771a32c4c360c95a644
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsexpression.h
@@ -358,7 +358,7 @@ class CORE_EXPORT QgsExpression
static const int HOUR = 60 * 60;
static const int MINUTE = 60;
public:
Interval( double seconds = 0 ) { mSeconds = seconds; }
Interval( double seconds = 0 ): mSeconds(seconds), mValid(true) { }
~Interval();
double years() { return mSeconds / YEARS;}
double months() { return mSeconds / MONTHS; }

0 comments on commit bd00b0f

Please sign in to comment.