From 41921e728c3f73916bf9259510d85d674c0dad7c Mon Sep 17 00:00:00 2001 From: helixhorned Date: Wed, 13 Jun 2012 23:13:36 +0000 Subject: [PATCH] Polymost: don't attempt to draw sprite with void tile, preventing div-by-0s later git-svn-id: https://svn.eduke32.com/eduke32@2760 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 6ec9c8240..509b8a462 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -5027,6 +5027,9 @@ void polymost_drawsprite(int32_t snum) tsizy = h_ysize[globalpicnum]; } + if (tsizx<=0 || tsizy<=0) + return; + switch ((globalorientation>>4)&3) { case 0: //Face sprite