diff options
author | sebres <sebres@users.sourceforge.net> | 2024-03-22 20:07:26 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2024-03-22 20:07:26 (GMT) |
commit | c3c199a7a7552789df8ad0bdc070e8cd7564e624 (patch) | |
tree | 34803c3ff3b608c7c832fd1a1a5ecc48d7606c6c /generic/tclClockFmt.c | |
parent | 113546781445116beed169e466d9a95a6160addd (diff) | |
download | tcl-c3c199a7a7552789df8ad0bdc070e8cd7564e624.zip tcl-c3c199a7a7552789df8ad0bdc070e8cd7564e624.tar.gz tcl-c3c199a7a7552789df8ad0bdc070e8cd7564e624.tar.bz2 |
small amend (unsaved change)
Diffstat (limited to 'generic/tclClockFmt.c')
-rw-r--r-- | generic/tclClockFmt.c | 8 |
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; |