mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-30 16:01:49 +00:00
- fix /0 error caused by having a completely black font character. this error was triggered by Return of the Triad.
This commit is contained in:
parent
e02690af58
commit
cb8ae0b560
1 changed files with 4 additions and 0 deletions
|
@ -673,6 +673,10 @@ void V_ApplyLuminosityTranslation(int translation, uint8_t* pixel, int size)
|
|||
int lum_range = (lum_max - lum_min + 1);
|
||||
PalEntry* remap = paletteptr + colorrange * 256;
|
||||
|
||||
// why was this ever allowed to divide by zero?
|
||||
if (!lum_max)
|
||||
lum_max++;
|
||||
|
||||
for (int i = 0; i < size; i++, pixel += 4)
|
||||
{
|
||||
// we must also process the transparent pixels here to ensure proper filtering on the characters' edges.
|
||||
|
|
Loading…
Reference in a new issue