From 48c06a98b3367aafb3388d3e65ce0d662ef8bc53 Mon Sep 17 00:00:00 2001 From: gumi Date: Mon, 29 Jan 2018 22:02:24 -0500 Subject: fix the nullpo check in builtin_getcharid --- CHANGELOG | 4 ++++ src/map/script-fun.cpp | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 6f14627..a34b701 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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(st->stack, -1); + return; + } if (num == 0) push_int(st->stack, unwrap(sd->status_key.char_id)); -- cgit v1.2.3-60-g2f50