R_DrawMaskedColumn: do not draw zero length column
This commit is contained in:
1 parent
4c25b7c26a
commit
89a64267fa
1 file changed
+2
-2
+2
-2
@@ -622,7 +622,7 @@ void R_DrawMaskedColumn(column_t *column)
|
||||
if (dc_yh >= vid.height)
|
||||
dc_yh = vid.height - 1;
|
||||
|
||||
if (dc_yl <= dc_yh && dc_yh > 0)
|
||||
if (dc_yl <= dc_yh && dc_yh > 0&& column->length != 0)
|
||||
{
|
||||
dc_source = (UINT8 *)column + 3;
|
||||
dc_texturemid = basetexturemid - (topdelta<<FRACBITS);
|
||||
@@ -682,7 +682,7 @@ static void R_DrawFlippedMaskedColumn(column_t *column)
|
||||
if (dc_yh >= vid.height)
|
||||
dc_yh = vid.height - 1;
|
||||
|
||||
if (dc_yl <= dc_yh && dc_yh > 0)
|
||||
if (dc_yl <= dc_yh && dc_yh > 0 && column->length != 0)
|
||||
{
|
||||
dc_source = ZZ_Alloc(column->length);
|
||||
for (s = (UINT8 *)column+2+column->length, d = dc_source; d < dc_source+column->length; --s)
|
||||
|
||||
Reference in new issue
Block a user