Skip to content
Snippets Groups Projects
Commit ee4ba9ae authored by Reimar Döffinger's avatar Reimar Döffinger
Browse files

Fix incorrect increment in sgidec.c


Fixes trac issue #899.

Signed-off-by: default avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 0c019473
No related branches found
No related tags found
No related merge requests found
...@@ -137,7 +137,8 @@ static int read_uncompressed_sgi(unsigned char* out_buf, uint8_t* out_end, ...@@ -137,7 +137,8 @@ static int read_uncompressed_sgi(unsigned char* out_buf, uint8_t* out_end,
for (y = s->height - 1; y >= 0; y--) { for (y = s->height - 1; y >= 0; y--) {
out_end = out_buf + (y * s->linesize); out_end = out_buf + (y * s->linesize);
for (x = s->width; x > 0; x--) { for (x = s->width; x > 0; x--) {
ptr = in_buf += s->bytes_per_channel; ptr = in_buf;
in_buf += s->bytes_per_channel;
for(z = 0; z < s->depth; z ++) { for(z = 0; z < s->depth; z ++) {
memcpy(out_end, ptr, s->bytes_per_channel); memcpy(out_end, ptr, s->bytes_per_channel);
out_end += s->bytes_per_channel; out_end += s->bytes_per_channel;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment