diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2020-06-23 08:00:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 08:00:00 +0800 |
commit | 520863eaeda83da14b88d09f6378cd8abd5a5174 (patch) | |
tree | 2496ea36744dc2f51d264741a78699e719ceeb3b /src/map/npc_chat.c | |
parent | 0b7768837bed2aa521de5b9b76b2348943d7db20 (diff) | |
parent | 9b89425550094f51d633e5b5d6e86af65bffbf39 (diff) | |
download | hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.gz hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.bz2 hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.tar.xz hercules-520863eaeda83da14b88d09f6378cd8abd5a5174.zip |
Merge branch 'master' into jedzkie-pr03
Diffstat (limited to 'src/map/npc_chat.c')
-rw-r--r-- | src/map/npc_chat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 0ca84cff4..0df323e96 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -394,7 +394,8 @@ static int npc_chat_sub(struct block_list *bl, va_list ap) // save out the matched strings for (i = 0; i < r; i++) { - char var[15], val[255]; + char var[SCRIPT_VARNAME_LENGTH + 1]; + char val[SCRIPT_STRING_VAR_LENGTH + 1]; snprintf(var, sizeof(var), "$@p%i$", i); libpcre->copy_substring(msg, offsets, r, i, val, sizeof(val)); script->set_var(sd, var, val); |