diff options
author | gumi <git@gumi.ca> | 2018-01-29 22:02:24 -0500 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-01-29 22:02:24 -0500 |
commit | 48c06a98b3367aafb3388d3e65ce0d662ef8bc53 (patch) | |
tree | 71733e26c692138923064d12b6d6a442416f47f9 | |
parent | 4f696a07b35826314ca1f77fe83eca70cb0be356 (diff) | |
download | tmwa-48c06a98b3367aafb3388d3e65ce0d662ef8bc53.tar.gz tmwa-48c06a98b3367aafb3388d3e65ce0d662ef8bc53.tar.bz2 tmwa-48c06a98b3367aafb3388d3e65ce0d662ef8bc53.tar.xz tmwa-48c06a98b3367aafb3388d3e65ce0d662ef8bc53.zip |
fix the nullpo check in builtin_getcharid
-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)); |