From b77231a9a365cdcbb268101141b99200e11173b7 Mon Sep 17 00:00:00 2001 From: James Brown Date: Mon, 1 Mar 2004 04:05:10 +0000 Subject: Fix from Roever for bug #892827 svn-id: r13107 --- sword1/screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sword1/screen.cpp') 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)]; -- cgit v1.2.3