From 3cf3ae0dbf7a6759ffd205073bcfb0d855e7727c Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 22 Oct 2017 16:25:34 +0200 Subject: 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 --- src/map/script.c | 5 +++-- 1 file 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); -- cgit v1.2.3-60-g2f50