Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/commands.c @ 2326:54b4272de463
Silence compiler warnings (-Wformat-truncation, -Wstringop-truncation)
author | Michał Kępień <bitbucket@kempniu.pl> |
---|---|
date | Fri, 28 Sep 2018 06:45:58 +0200 |
parents | a62bbd4d7061 |
children | 8ecc28068748 |
line wrap: on
line diff
--- a/mcabber/mcabber/commands.c Mon Sep 24 21:04:09 2018 +0200 +++ b/mcabber/mcabber/commands.c Fri Sep 28 06:45:58 2018 +0200 @@ -1982,7 +1982,7 @@ char tbuf[128]; strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", localtime(&rst_time)); - snprintf(buffer, 127, "Status timestamp: %s", tbuf); + snprintf(buffer, 4095, "Status timestamp: %s", tbuf); scr_WriteIncomingMessage(bjid, buffer, 0, HBB_PREFIX_INFO | HBB_PREFIX_CONT, 0); } @@ -3166,7 +3166,7 @@ char tbuf[128]; strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", localtime(&rst_time)); - snprintf(buffer, 127, "Timestamp: %s", tbuf); + snprintf(buffer, 4095, "Timestamp: %s", tbuf); scr_WriteIncomingMessage(bjid, buffer, 0, msg_flag | HBB_PREFIX_CONT, 0); }