diff options
author | Haru <haru@dotalux.com> | 2018-04-08 22:14:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-08 22:14:05 +0200 |
commit | 21b56f6e44722e82405b78bee16a1a409743f58a (patch) | |
tree | 58df8a4d5c3648d71c6f2544a22777e951333858 /src/map/script.c | |
parent | dd6655709ea9f61cec8229d98fe9e4a9bc31bf14 (diff) | |
parent | 2bc4b4f09d00a92b28805eeeb5b5624064983255 (diff) | |
download | hercules-21b56f6e44722e82405b78bee16a1a409743f58a.tar.gz hercules-21b56f6e44722e82405b78bee16a1a409743f58a.tar.bz2 hercules-21b56f6e44722e82405b78bee16a1a409743f58a.tar.xz hercules-21b56f6e44722e82405b78bee16a1a409743f58a.zip |
Merge pull request #2009 from MishimaHaruna/sprintf-hooking-fix
Fix HPMHooking compilation when sprintf() is a macro
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/script.c b/src/map/script.c index 275601dcc..d11b6741a 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5625,7 +5625,7 @@ const char *script_getfuncname(struct script_state *st) { * already initialized) * @retval false if an error occurs. */ -bool script_sprintf(struct script_state *st, int start, struct StringBuf *out) +bool script_sprintf_helper(struct script_state *st, int start, struct StringBuf *out) { const char *format = NULL; const char *p = NULL, *np = NULL; @@ -5678,7 +5678,7 @@ bool script_sprintf(struct script_state *st, int start, struct StringBuf *out) } // placeholder = "%n" ; (ignored) if (*np == 'n') { - ShowWarning("script_sprintf: Format %%n not supported! Skipping...\n"); + ShowWarning("script_sprintf_helper: Format %%n not supported! Skipping...\n"); script->reportsrc(st); lastarg = nextarg; p = np + 1; @@ -5881,7 +5881,7 @@ BUILDIN(mesf) StrBuf->Init(&buf); - if (!script_sprintf(st, 2, &buf)) { + if (!script->sprintf_helper(st, 2, &buf)) { StrBuf->Destroy(&buf); return false; } @@ -16793,7 +16793,7 @@ BUILDIN(sprintf) struct StringBuf buf; StrBuf->Init(&buf); - if (!script_sprintf(st, 2, &buf)) { + if (!script->sprintf_helper(st, 2, &buf)) { StrBuf->Destroy(&buf); script_pushconststr(st, ""); return false; @@ -25219,7 +25219,7 @@ void script_defaults(void) script->search_str = script_search_str; script->setd_sub = setd_sub; script->attach_state = script_attach_state; - script->sprintf = script_sprintf; + script->sprintf_helper = script_sprintf_helper; script->queue = script_hqueue_get; script->queue_add = script_hqueue_add; |