diff --git a/src/gl/textures/gl_hwtexture.cpp b/src/gl/textures/gl_hwtexture.cpp index ac789504e..f6edec687 100644 --- a/src/gl/textures/gl_hwtexture.cpp +++ b/src/gl/textures/gl_hwtexture.cpp @@ -93,8 +93,8 @@ void FHardwareTexture::Resize(int width, int height, unsigned char *src_data, un // down we will need to gather a grid of pixels of the size of the scale // factor in each direction and then do an averaging of the pixels. - TArray vPrecalcs(height); - TArray hPrecalcs(width); + TArray vPrecalcs(height, true); + TArray hPrecalcs(width, true); ResampleBoxPrecalc(vPrecalcs, texheight); ResampleBoxPrecalc(hPrecalcs, texwidth); diff --git a/src/tarray.h b/src/tarray.h index 92a456550..acc080012 100644 --- a/src/tarray.h +++ b/src/tarray.h @@ -132,10 +132,10 @@ public: Count = 0; Array = NULL; } - TArray (int max) + TArray (int max, bool reserve = false) { Most = max; - Count = 0; + Count = reserve? max : 0; Array = (T *)M_Malloc (sizeof(T)*max); } TArray (const TArray &other)