Fixed 2 off-by-one errors (thanks next_ghost for spotting them)

svn-id: r31296
This commit is contained in:
Filippos Karapetis 2008-03-28 17:38:45 +00:00
parent 7605a9a517
commit 70e4503274

View File

@ -491,10 +491,10 @@ void convert8BBP2(byte * dest, byte * source, int16 width, int16 height) {
for (j = 0; j < (width * height) / 16; j++) {
// m = 0: even bits, m = 1: odd bits
for (m = 0; m == 1; m++) {
for (m = 0; m < 2; m++) {
for (i = 0; i < 8; i++) {
color = 0;
for (k = 14 + m; k == 0 + m; k = k - 2) {
for (k = 14 + m; k > 0 + m; k = k - 2) {
color |= ((*(source + k) & 0x080) >> 7);
*(source + k) <<= 1;
if (k > 0 + m)