# HG changeset patch # User Matti Hamalainen # Date 1317009809 -10800 # Node ID 55bd29745535ca3786dd142d0e1355b1fb97ff87 # Parent d554e443475d3cf7e3e0bb92f24410cdb2120123 Fix a NASTY bug in TEXTURE2 lump directory reading. This sometimes/often caused many operations (such as texture aligning) to fail. diff -r d554e443475d -r 55bd29745535 src/textures.cc --- a/src/textures.cc Mon Sep 26 07:00:55 2011 +0300 +++ b/src/textures.cc Mon Sep 26 07:03:29 2011 +0300 @@ -531,7 +531,7 @@ dir->wadfile->read_i32(&numtex); // Read in the offsets for texture2 names offsets = (i32 *) GetMemory((long) numtex * 4); - dir->wadfile->read_i32(offsets); + dir->wadfile->read_i32(offsets, numtex); for (n = 0; n < numtex && !texofs; n++) { dir->wadfile->seek(dir->dir.start + offsets[n]);