aboutsummaryrefslogtreecommitdiffstats
path: root/strftime.c
diff options
context:
space:
mode:
Diffstat (limited to 'strftime.c')
-rw-r--r--strftime.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/strftime.c b/strftime.c
index 3727bc40ea..076822742b 100644
--- a/strftime.c
+++ b/strftime.c
@@ -610,7 +610,10 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
#endif /* HAVE_TM_ZONE */
#endif /* HAVE_TZNAME */
#endif /* 0 */
- tp = vtm->zone;
+ if (vtm->zone == NULL)
+ tp = "";
+ else
+ tp = vtm->zone;
i = strlen(tp);
break;