From ded92aa9774cae9ee052c2cbd72d7e05eb95328e Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 24 May 2015 11:05:44 -0700 Subject: [PATCH] Resize here just to be safe. Not that a texture ought to be > 2MB, but in case we lower that initial buffer size or something. --- GPU/GLES/TextureCache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index c711149e34..a66bd8b84f 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -1701,6 +1701,7 @@ void *TextureCache::DecodeTextureLevel(GETextureFormat format, GEPaletteFormat c // Special case: if we don't need to deal with packing, we don't need to copy. if ((g_Config.iTexScalingLevel == 1 && gl_extensions.EXT_unpack_subimage) || w == bufw) { if (UseBGRA8888()) { + tmpTexBuf32.resize(std::max(bufw, w) * h); finalBuf = tmpTexBuf32.data(); ConvertColors(finalBuf, texptr, dstFmt, bufw * h); } else {