From: rootvector2 <
dxbnaveed.k@gmail.com>
---
zic.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/zic.c b/zic.c
index c0891001..64090fce 100644
--- a/zic.c
+++ b/zic.c
@@ -3171,6 +3171,7 @@ stringoffset(char *result, zic_t offset)
register int hours;
register int minutes;
register int seconds;
+ zic_t zhours;
bool negative = offset < 0;
int len = negative;
@@ -3182,11 +3183,12 @@ stringoffset(char *result, zic_t offset)
offset /= SECSPERMIN;
minutes = offset % MINSPERHOUR;
offset /= MINSPERHOUR;
- hours = offset;
- if (hours >= HOURSPERDAY * DAYSPERWEEK) {
+ zhours = offset;
+ if (zhours >= HOURSPERDAY * DAYSPERWEEK) {
result[0] = '\0';
return 0;
}
+ hours = zhours;
len += sprintf(result + len, "%d", hours);
if (minutes != 0 || seconds != 0) {
len += sprintf(result + len, ":%02d", minutes);
--
2.52.0