[Kst] extragear/graphics/kst/src/libkstmath
George Staikos
staikos at kde.org
Tue Mar 14 02:56:13 CET 2006
SVN commit 518422 by staikos:
Fix assertion failure when running for a long time with no changes: the Numnew
variable was being incremented with invalid data and wrapping.
M +9 -3 kstpsd.cpp
--- trunk/extragear/graphics/kst/src/libkstmath/kstpsd.cpp #518421:518422
@@ -26,6 +26,7 @@
#include <kglobal.h>
#include <klocale.h>
+#include "ksdebug.h"
#include "dialoglauncher.h"
#include "kstdatacollection.h"
@@ -335,12 +336,17 @@
--n_subsets;
}
+ // Don't touch _last_n_new if !xUpdated since it will certainly be wrong.
+ if (!xUpdated && !force) {
+ return setLastUpdateResult(NO_CHANGE);
+ }
+
_last_n_new += iv->numNew();
assert(_last_n_new >= 0);
- if ((!xUpdated || (_last_n_new < _PSDLen/16 &&
- n_subsets - _last_n_subsets < 1 &&
- iv->length() != iv->numNew())) && !force) {
+ if ((_last_n_new < _PSDLen/16 &&
+ n_subsets - _last_n_subsets < 1 &&
+ iv->length() != iv->numNew()) && !force) {
return setLastUpdateResult(NO_CHANGE);
}
More information about the Kst
mailing list