Browse Source

loadsave: Fix off-by-one in RemoveEmptyLevelItems

Refs #1367
pull/1438/head
Gleb Mazovetskiy 5 years ago committed by Anders Jenbo
parent
commit
cc75b7a948
  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 (items[ii].isEmpty()) {
dItem[items[ii]._ix][items[ii]._iy] = 0;

Loading…
Cancel
Save