diff --git a/src/r_draw_span.cpp b/src/r_draw_span.cpp index b9d81b646..c0381faf3 100644 --- a/src/r_draw_span.cpp +++ b/src/r_draw_span.cpp @@ -120,6 +120,8 @@ static void R_DrawSpanTemplate(drawspandata_t* ds) intptr_t count = (ds->x2 - ds->x1 + 1); //size_t i; + const INT32 stride = vid.height; + xposition = ds->xfrac; yposition = ds->yfrac; xstep = ds->xstep; ystep = ds->ystep; @@ -178,8 +180,8 @@ static void R_DrawSpanTemplate(drawspandata_t* ds) *dest = R_DrawSpanPixel(ds, dsrc, colormap, bit, source); - dest += vid.height; - dsrc += vid.height; + dest += stride; + dsrc += stride; xposition += xstep; yposition += ystep;