diff options
author | gumi <git@gumi.ca> | 2018-06-15 11:38:48 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-06-15 11:38:48 -0400 |
commit | d2c0e453fc95b3f8ce9270e8290d15687e6e3235 (patch) | |
tree | e0d103e5a4a2760b36fd0296793add6a3eb69082 | |
parent | c125e9eda79a7c951a9be184f4e8a4ad62169466 (diff) | |
download | hercules-d2c0e453fc95b3f8ce9270e8290d15687e6e3235.tar.gz hercules-d2c0e453fc95b3f8ce9270e8290d15687e6e3235.tar.bz2 hercules-d2c0e453fc95b3f8ce9270e8290d15687e6e3235.tar.xz hercules-d2c0e453fc95b3f8ce9270e8290d15687e6e3235.zip |
always give a return value in buildin_getunits
-rw-r--r-- | src/map/script.c | 2 |
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 } } |