summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-01-29 22:02:24 -0500
committergumi <git@gumi.ca>2018-01-29 22:02:24 -0500
commit48c06a98b3367aafb3388d3e65ce0d662ef8bc53 (patch)
tree71733e26c692138923064d12b6d6a442416f47f9 /src
parent4f696a07b35826314ca1f77fe83eca70cb0be356 (diff)
downloadtmwa-48c06a98b3367aafb3388d3e65ce0d662ef8bc53.tar.gz
tmwa-48c06a98b3367aafb3388d3e65ce0d662ef8bc53.tar.bz2
tmwa-48c06a98b3367aafb3388d3e65ce0d662ef8bc53.tar.xz
tmwa-48c06a98b3367aafb3388d3e65ce0d662ef8bc53.zip
fix the nullpo check in builtin_getcharidv18.1.29.1
Diffstat (limited to 'src')
-rw-r--r--src/map/script-fun.cpp5
1 files changed, 4 insertions, 1 deletions
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));