summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2019-08-04 23:11:40 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-10-27 10:49:23 -0400
commit5f4e0b6578570f6dede7826760d5bcbb302454c7 (patch)
treeb69ce7241e55317827f4ab9384b0dab542a8120a /apps
parent9bd13865b70b37844dec846d08cdb2540b49de55 (diff)
downloadrockbox-5f4e0b6578570f6dede7826760d5bcbb302454c7.tar.gz
rockbox-5f4e0b6578570f6dede7826760d5bcbb302454c7.zip
quake: Bail out of out-of-bounds draws
With this Quake should hopefully be able to run at native resolution on smaller screens. Change-Id: Ic30c8356eb2fd030a4cf84c54b63c9b688a9c14a
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/sdl/progs/quake/draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/sdl/progs/quake/draw.c b/apps/plugins/sdl/progs/quake/draw.c
index 2a2f65bf4c..c870e6baba 100644
--- a/apps/plugins/sdl/progs/quake/draw.c
+++ b/apps/plugins/sdl/progs/quake/draw.c
@@ -297,7 +297,7 @@ void Draw_Pic (int x, int y, qpic_t *pic)
297 (y < 0) || 297 (y < 0) ||
298 (y + pic->height > vid.height)) 298 (y + pic->height > vid.height))
299 { 299 {
300 Sys_Error ("Draw_Pic: bad coordinates"); 300 return;
301 } 301 }
302 302
303 source = pic->data; 303 source = pic->data;
@@ -346,7 +346,7 @@ void Draw_TransPic (int x, int y, qpic_t *pic)
346 if (x < 0 || (unsigned)(x + pic->width) > vid.width || y < 0 || 346 if (x < 0 || (unsigned)(x + pic->width) > vid.width || y < 0 ||
347 (unsigned)(y + pic->height) > vid.height) 347 (unsigned)(y + pic->height) > vid.height)
348 { 348 {
349 Sys_Error ("Draw_TransPic: bad coordinates"); 349 return;
350 } 350 }
351 351
352 source = pic->data; 352 source = pic->data;
@@ -433,7 +433,7 @@ void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation)
433 if (x < 0 || (unsigned)(x + pic->width) > vid.width || y < 0 || 433 if (x < 0 || (unsigned)(x + pic->width) > vid.width || y < 0 ||
434 (unsigned)(y + pic->height) > vid.height) 434 (unsigned)(y + pic->height) > vid.height)
435 { 435 {
436 Sys_Error ("Draw_TransPic: bad coordinates"); 436 return;
437 } 437 }
438 438
439 source = pic->data; 439 source = pic->data;