diff --git a/src/resourcefiles/resourcefile.cpp b/src/resourcefiles/resourcefile.cpp index 64fe9b6cf..223ad861e 100644 --- a/src/resourcefiles/resourcefile.cpp +++ b/src/resourcefiles/resourcefile.cpp @@ -450,6 +450,8 @@ bool FResourceFile::FindPrefixRange(FString filter, void *lumps, size_t lumpsize FResourceLump *lump; int cmp; + end = start = 0; + // Pretend that our range starts at 1 instead of 0 so that we can avoid // unsigned overflow if the range starts at the first lump. lumps = (BYTE *)lumps - lumpsize;