diff options
author | Haru <haru@dotalux.com> | 2017-10-22 16:25:34 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2017-10-22 16:25:34 +0200 |
commit | 3cf3ae0dbf7a6759ffd205073bcfb0d855e7727c (patch) | |
tree | aa6341fc74e87b6709100ac74819f05c224e0b0e /src/map | |
parent | f7dfa7af3afb86ad6d3dd9dd8ccbf660226b5ddb (diff) | |
download | hercules-3cf3ae0dbf7a6759ffd205073bcfb0d855e7727c.tar.gz hercules-3cf3ae0dbf7a6759ffd205073bcfb0d855e7727c.tar.bz2 hercules-3cf3ae0dbf7a6759ffd205073bcfb0d855e7727c.tar.xz hercules-3cf3ae0dbf7a6759ffd205073bcfb0d855e7727c.zip |
Fix an incorrect null check in BUILDIN(logmes)
The incorrect check would cause the `logmes()` script command to never
log to database (but rather output a backtrace to the console)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index d2101d21f..1bbffa20e 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -15866,11 +15866,12 @@ enum logmes_type { /*========================================== * Allows player to write logs (i.e. Bank NPC, etc) [Lupus] *------------------------------------------*/ -BUILDIN(logmes) { +BUILDIN(logmes) +{ const char *str = script_getstr(st, 2); struct map_session_data *sd = script->rid2sd(st); enum logmes_type type = LOGMES_NPC; - nullpo_retr(sd, false); + nullpo_retr(false, sd); if (script_hasdata(st, 3)) { type = script_getnum(st, 3); |