Shanjaq / uhexen2

GitHub clone of SVN repo svn://svn.code.sf.net/p/uhexen2/code/trunk (cloned by http://svn2github.com/)
12 stars 1 forks source link

Fix for a game crash while trying to display full inventory with ring items in it. #82

Closed DelusionalBear closed 2 years ago

DelusionalBear commented 2 years ago

The crash happens in line 812 (originally 808) of gl_texmgr.c as a result of division by 0. But the real culprit is function TexMgr_Pad (gl_texmgr.c) which should return padded to the power of 2 texture size, but for some reason returns 1, if one of the texture dimensions equals 1. (should return 2) The texture in question is 1 pixel height image representing 'progress bar' below each ring. (rhlthcvr.lmp and/or ringhlth.lmp)