mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-24 21:01:17 +00:00
fix an fp fault with 1x1 textures when gl_picmap > 0
This commit is contained in:
parent
e128c229dc
commit
014930183e
1 changed files with 2 additions and 4 deletions
|
@ -1176,10 +1176,8 @@ static unsigned scaled[1024*512]; // [512*256];
|
|||
scaled_width >>= (int)gl_picmip->value;
|
||||
scaled_height >>= (int)gl_picmip->value;
|
||||
|
||||
if (scaled_width > gl_max_size->value)
|
||||
scaled_width = gl_max_size->value;
|
||||
if (scaled_height > gl_max_size->value)
|
||||
scaled_height = gl_max_size->value;
|
||||
scaled_width = max (1, min (scaled_width, gl_max_size->value));
|
||||
scaled_height = max (1, min (scaled_height, gl_max_size->value));
|
||||
|
||||
if (scaled_width * scaled_height > sizeof(scaled)/4)
|
||||
Sys_Error ("GL_LoadTexture: too big");
|
||||
|
|
Loading…
Reference in a new issue