summaryrefslogtreecommitdiffstats
path: root/generic/tclClockFmt.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-03-22 20:07:26 (GMT)
committersebres <sebres@users.sourceforge.net>2024-03-22 20:07:26 (GMT)
commit7bf2e0d35ca259f8e18f72ba4390102fe02ed513 (patch)
tree34803c3ff3b608c7c832fd1a1a5ecc48d7606c6c /generic/tclClockFmt.c
parent37b65d597141873dd297aa86ec8e4c781380a2ca (diff)
downloadtcl-7bf2e0d35ca259f8e18f72ba4390102fe02ed513.zip
tcl-7bf2e0d35ca259f8e18f72ba4390102fe02ed513.tar.gz
tcl-7bf2e0d35ca259f8e18f72ba4390102fe02ed513.tar.bz2
small amend (unsaved change)
Diffstat (limited to 'generic/tclClockFmt.c')
-rw-r--r--generic/tclClockFmt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c
index d36b4a8..76af74c 100644
--- a/generic/tclClockFmt.c
+++ b/generic/tclClockFmt.c
@@ -79,22 +79,22 @@ _str2int(
val = val * 10 + (*p++ - '0');
}
while (p < e) { /* check for overflow */
+ prev = val;
val = val * 10 + (*p++ - '0');
if (val / 10 < prev) {
return TCL_ERROR;
}
- prev = val;
}
} else {
while (p < eNO) { /* never overflows */
val = val * 10 - (*p++ - '0');
}
while (p < e) { /* check for overflow */
+ prev = val;
val = val * 10 - (*p++ - '0');
if (val / 10 > prev) {
return TCL_ERROR;
}
- prev = val;
}
}
*out = val;
@@ -119,22 +119,22 @@ _str2wideInt(
val = val * 10 + (*p++ - '0');
}
while (p < e) { /* check for overflow */
+ prev = val;
val = val * 10 + (*p++ - '0');
if (val / 10 < prev) {
return TCL_ERROR;
}
- prev = val;
}
} else {
while (p < eNO) { /* never overflows */
val = val * 10 - (*p++ - '0');
}
while (p < e) { /* check for overflow */
+ prev = val;
val = val * 10 - (*p++ - '0');
if (val / 10 > prev) {
return TCL_ERROR;
}
- prev = val;
}
}
*out = val;