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.
This commit is contained in:
Unknown W. Brackets committed 2015-05-24 11:06:34 -07:00
1 parent 3b96bf8712
commit ded92aa977
1 file changed
+1
+1
View File
@@ -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 {