summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfeed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfeed.c b/sfeed.c
index 4db238e..a42d6bd 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -323,7 +323,7 @@ gettimetz(const char *s, char *buf, size_t bufsiz) {
else if(sscanf(p, "%c%02d%02d", &c, &tzhour, &tzmin) > 0);
else if(sscanf(p, "%c%d", &c, &tzhour) > 0)
tzmin = 0;
- snprintf(buf, sizeof(buf) - 1, "%s%c%02d%02d", tzname, c, tzhour, tzmin);
+ snprintf(buf, bufsiz, "%s%c%02d%02d", tzname, c, tzhour, tzmin);
/* TODO: test + or - offset */
return (tzhour * 3600) + (tzmin * 60) * (c == '-' ? -1 : 1);
}