diff options
Diffstat (limited to 'sword1/screen.cpp')
-rw-r--r-- | sword1/screen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sword1/screen.cpp b/sword1/screen.cpp index faac076d3d..c037b1ae72 100644 --- a/sword1/screen.cpp +++ b/sword1/screen.cpp @@ -943,7 +943,7 @@ void Screen::plotYUV(byte *lut, int width, int height, byte *const *dat) { for (y = 0; y < height; y += 2) { for (x = 0; x < width; x += 2) { - int i = ((((dat[2][cpos] + ROUNDADD) >> SHIFT) * BITDEPTH) + ((dat[1][cpos] + ROUNDADD)>>SHIFT)) * BITDEPTH; + int i = ((((dat[2][cpos] + ROUNDADD) >> SHIFT) * (BITDEPTH+1)) + ((dat[1][cpos] + ROUNDADD)>>SHIFT)) * (BITDEPTH+1); cpos++; buf[linepos ] = lut[i + ((dat[0][ ypos ] + ROUNDADD) >> SHIFT)]; |