Browse Source

loadsave: Fix off-by-one in RemoveEmptyLevelItems

Refs #1367
pull/1485/head
Gleb Mazovetskiy 5 years ago committed by Anders Jenbo
parent
commit
a8e7bdfc81
  1. 2
      Source/loadsave.cpp

2
Source/loadsave.cpp

@ -965,7 +965,7 @@ void RemoveEmptyInventory(int pnum)
void RemoveEmptyLevelItems()
{
for (int i = numitems; i >= 0; i--) {
for (int i = numitems; i > 0; i--) {
int ii = itemactive[i];
if (item[ii].isEmpty()) {
dItem[item[ii]._ix][item[ii]._iy] = 0;

Loading…
Cancel
Save