From a02eaeecda6307641ead5150b972f2dd8230f719 Mon Sep 17 00:00:00 2001 From: BC Ko Date: Wed, 11 Aug 2021 07:34:50 -0700 Subject: [PATCH] use abs --- Source/inv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/inv.cpp b/Source/inv.cpp index 7becd98a0..b0f453cb0 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -451,7 +451,7 @@ void CheckInvPaste(int pnum, Point cursorPosition) done = false; } else { if (player.InvGrid[xx + yy] != 0) { - int8_t iv = std::max(player.InvGrid[xx + yy], 0); + int8_t iv = abs(player.InvGrid[xx + yy]); if (it != 0) { if (it != iv) done = false;