aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-03-25 00:45:40 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-03-25 00:45:40 +0000
commit0af3e1a1af86c52991af450107a73b036fc42cb0 (patch)
treee935e549e89d5bfbcfe2fc96c32c2593d60a0096
parent886388f1449470b13b4f3749541314d34b6ef1c7 (diff)
downloadverteco-0af3e1a1af86c52991af450107a73b036fc42cb0.tar.gz
modbuslog: force interval wrap around
A hand edited file could miss the wrap around magic number and miss it.
-rw-r--r--src/modbuslog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modbuslog.c b/src/modbuslog.c
index 320f56b..d42a024 100644
--- a/src/modbuslog.c
+++ b/src/modbuslog.c
@@ -354,7 +354,7 @@ int main(int argc, char *argv[]) {
fscanf(intervalfile, "%d", &intervalid);
//handle 32bit signed overflow
- if (intervalid == 2147483647) {
+ if (intervalid >= 2147483647) {
intervalid = 0;
} else {
intervalid++;