diff options
-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; |