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;