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 bd00b0f
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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.