no adjustment for unchanged value
[pulsecounter.git] / linux / dbstore.c
index b71a32a2daabdc694c991a532a2331f4b79244e7..d5d7ee7fe89bf044c973ddec4a182e91333df7db 100644 (file)
@@ -104,7 +104,7 @@ int dbstore(uint8_t which, uint32_t val)
                if (row && *row) prev_val = atoi(*row);
                mysql_free_result(result);
        }
-       if (val <= prev_val) {
+       if (val < prev_val) {
                snprintf(statement, sizeof(statement),
                         "insert into %sadj values (\"%s\",%u);\n",
                         table, tstr, prev_val);