Skip to content

Commit f9365be

Browse files
committed
Fix R_CreateImage() crash with r_logFile
Fixes a crash resulting from `va()` overflow.
1 parent 472b232 commit f9365be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/engine/renderer/tr_image.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3101,9 +3101,10 @@ qhandle_t RE_GenerateTexture( const byte *pic, int width, int height )
31013101
return 0;
31023102
}
31033103

3104-
const char *name = va( "rocket%d", numTextures++ );
31053104
R_SyncRenderThread();
31063105

3106+
const char *name = va( "rocket%d", numTextures++ );
3107+
31073108
imageParams_t imageParams = {};
31083109
imageParams.bits = IF_NOPICMIP;
31093110
imageParams.filterType = filterType_t::FT_LINEAR;

0 commit comments

Comments
 (0)