Corrected some GCC 7.1+ compile warnings (#3522)

* Fixes #2787 and fixes #3513.
* Resolved some format-truncation warnings.
* The remaining will be fixed at a later time.
Thanks to @RadianFord and @Lemongrass3110!
This commit is contained in:
Aleos
2018-09-28 13:57:27 -04:00
committed by GitHub
parent b7ba7fe5a6
commit 926e37cb65
7 changed files with 22 additions and 21 deletions

View File

@@ -372,7 +372,7 @@ int npc_chat_sub(struct block_list* bl, va_list ap)
// save out the matched strings
for (i = 0; i < r; i++)
{
char var[6], val[255];
char var[255], val[255];
snprintf(var, sizeof(var), "$@p%i$", i);
pcre_copy_substring(msg, offsets, r, i, val, sizeof(val));
set_var(sd, var, val);