summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-06-15 11:38:48 -0400
committergumi <git@gumi.ca>2018-06-15 11:38:48 -0400
commitd2c0e453fc95b3f8ce9270e8290d15687e6e3235 (patch)
treee0d103e5a4a2760b36fd0296793add6a3eb69082 /src/map
parentc125e9eda79a7c951a9be184f4e8a4ad62169466 (diff)
downloadhercules-d2c0e453fc95b3f8ce9270e8290d15687e6e3235.tar.gz
hercules-d2c0e453fc95b3f8ce9270e8290d15687e6e3235.tar.bz2
hercules-d2c0e453fc95b3f8ce9270e8290d15687e6e3235.tar.xz
hercules-d2c0e453fc95b3f8ce9270e8290d15687e6e3235.zip
always give a return value in buildin_getunits
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 00fc4ed92..88d8095e5 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11282,7 +11282,9 @@ BUILDIN(getunits)
if (not_server_variable(*name)) {
sd = script->rid2sd(st);
+
if (sd == NULL) {
+ script_pushint(st, 0);
return true; // player variable but no player attached
}
}