From 9cba66c22eed86a95c24a3066404ac9fa037520c Mon Sep 17 00:00:00 2001 From: Sader Fawall Date: Tue, 14 Aug 2018 18:26:29 +0200 Subject: [PATCH] Fix string case in inarray command script (#3401) * Fixes #3400. Thanks to @anacondaqq and @sader1992! --- src/map/script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/script.cpp b/src/map/script.cpp index f388618ec7..5658d54751 100644 --- a/src/map/script.cpp +++ b/src/map/script.cpp @@ -6398,13 +6398,13 @@ BUILDIN_FUNC(inarray) for (i = 0; i <= array_size; ++i) { temp = (char*)get_val2(st, reference_uid(id, i), ref); - script_removetop(st, -1, 0); if (!strcmp(temp, value)) { + script_removetop(st, -1, 0); script_pushint(st, i); return SCRIPT_CMD_SUCCESS; } - + script_removetop(st, -1, 0); } } else