From 87d8588f67809128f93bbcf710f640d6a93f02d9 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 7 Jul 2019 03:46:43 +0200 Subject: [PATCH] Compare int to numbers --- Source/items.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index daf14d382..bdf471322 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -1650,7 +1650,7 @@ void GetItemPower(int i, int minlvl, int maxlvl, int flgs, BOOL onlygood) pre = random(23, 4); post = random(23, 3); - if (pre && !post) { + if (pre != 0 && post == 0) { if (random(23, 2)) post = 1; else @@ -1692,7 +1692,7 @@ void GetItemPower(int i, int minlvl, int maxlvl, int flgs, BOOL onlygood) goe = PL_Prefix[preidx].PLGOE; } } - if (post) { + if (post != 0) { nl = 0; for (j = 0; PL_Suffix[j].PLPower != -1; j++) { if (PL_Suffix[j].PLIType & flgs