Skip to content

Commit cd05541

Browse files
authored
Merge pull request #572 from red031000/master
nitrogfx - fix clang warning
2 parents 717b1ab + 9992aeb commit cd05541

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/nitrogfx/gfx.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static void Convert8BppFrom4BppTiles(unsigned char *src, unsigned char *dest, in
126126
for (int j = 0; j < 8; j++) {
127127
int idxComponentY = (chunkStartY * rowsPerChunk + rowsSoFar) * 8 + j;
128128

129-
for (int k = 0; k < 8; k++) {
129+
for (int k = 0; k < 8; k += 2) {
130130
int idxComponentX = (chunkStartX * colsPerChunk + tilesSoFar) * 8 + k;
131131
unsigned char srcPixelPair = *src++;
132132
unsigned char leftPixel = srcPixelPair & 0xF;
@@ -139,7 +139,6 @@ static void Convert8BppFrom4BppTiles(unsigned char *src, unsigned char *dest, in
139139

140140
dest[idxComponentY * pitch + idxComponentX] = ((palIndex - 1) << 4) | leftPixel;
141141
dest[idxComponentY * pitch + idxComponentX + 1] = ((palIndex - 1) << 4) | rightPixel;
142-
k++;
143142
}
144143
}
145144

0 commit comments

Comments
 (0)