From c7cf619ff401d877fb7af68fb1e986762050e108 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 27 Feb 2017 01:58:21 +0100 Subject: [PATCH] - Caution: Wads.GetLumpName with a char pointer is stupid because it doesn't 0-terminate its return. --- src/gl/data/gl_data.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gl/data/gl_data.cpp b/src/gl/data/gl_data.cpp index 93e4d5697..36ae3ad8f 100644 --- a/src/gl/data/gl_data.cpp +++ b/src/gl/data/gl_data.cpp @@ -109,6 +109,7 @@ void AdjustSpriteOffsets() { char str[9]; Wads.GetLumpName(str, i); + str[8] = 0; FTextureID texid = TexMan.CheckForTexture(str, FTexture::TEX_Sprite, 0); if (texid.isValid() && Wads.GetLumpFile(TexMan[texid]->SourceLump) > FWadCollection::IWAD_FILENUM) {