From d6d0e6dc60fad74c12d4bc3c03f22f1a68203779 Mon Sep 17 00:00:00 2001 From: Adam Powers Date: Sun, 1 Nov 2020 16:36:19 -0800 Subject: [PATCH] fix bug due to fancy logic --- win/shim/winshim.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/win/shim/winshim.c b/win/shim/winshim.c index 2910f0be6..4fb5f0d22 100644 --- a/win/shim/winshim.c +++ b/win/shim/winshim.c @@ -305,7 +305,11 @@ EM_JS(void, local_callback, (const char *cb_name, const char *shim_name, void *r // which field is being updated? args[0] = globalThis.nethackGlobal.constants["STATUS_FIELD"][args[0]]; // arg[1] is a string unless it is BL_CONDITION, BL_RESET, BL_FLUSH, BL_CHARACTERISTICS - if(["BL_CONDITION", "BL_RESET", "BL_FLUSH", "BL_CHARACTERISTICS"].indexOf(args[0] && args[1]) < 0) { + if(args[0] !== "BL_CONDITION" && + args[0] !== "BL_RESET" && + args[0] !== "BL_FLUSH" && + args[0] !== "BL_CHARACTERISTICS" && + args[1]) { args[1] = getArg(name, args[1], "s"); } else { args[1] = getArg(name, args[1], "p"); -- 2.50.1