diff options
author | Timo Sirainen <cras@irssi.org> | 2001-01-14 18:02:03 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-01-14 18:02:03 +0000 |
commit | d427f741432742e2aba05ac610421c7661ea4a30 (patch) | |
tree | ff136879ad1eb83ade2cfd408b20e7c01b792f81 /src/fe-common | |
parent | aa447813d02ef58b9582cbf69b0b871589de652d (diff) | |
download | irssi-d427f741432742e2aba05ac610421c7661ea4a30.zip |
Check the return value of strftime() properly
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1113 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-windows.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fe-common/core/fe-windows.c b/src/fe-common/core/fe-windows.c index 5f2af823..fba29a51 100644 --- a/src/fe-common/core/fe-windows.c +++ b/src/fe-common/core/fe-windows.c @@ -421,13 +421,14 @@ static void sig_server_disconnected(SERVER_REC *server) static void sig_print_text(void) { GSList *tmp; - char month[10]; + char month[100]; time_t t; struct tm *tm; t = time(NULL); tm = localtime(&t); - strftime(month, sizeof(month)-1, "%b", tm); + if (strftime(month, sizeof(month), "%b", tm) <= 0) + month[0] = '\0'; if (tm->tm_hour != 0 || tm->tm_min != 0) return; |