diff options
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | src/map/script-fun.cpp | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,7 @@ +v18.1.29.1 + - fix the previous release *facepalm* +v18.1.29 + - added missing nullpo checks in script commands v18.1.28 - fixed issues with magic weapon overrides v18.1.23 diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 9d4b8f6..92c2f0d 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -1996,7 +1996,10 @@ void builtin_getcharid(ScriptState *st) else sd = script_rid2sd(st); - nullpo_retv(sd); + if (sd == nullptr) { + push_int<ScriptDataInt>(st->stack, -1); + return; + } if (num == 0) push_int<ScriptDataInt>(st->stack, unwrap<CharId>(sd->status_key.char_id)); |