Fix access violation problem on high color mode Thanks to SuhwanSong
@@ -1419,7 +1419,7 @@ next:
goto end;
}
}
- if (dirty && mod_y == 5) {
+ if (dirty && (mod_y == 5 || y >= height)) {
orig_height = height;
if (output_count++ == 0) {
@@ -1442,6 +1442,9 @@ next:
if (SIXEL_FAILED(status)) {
goto error;
}
+ if (y >= orig_height) {
+ goto end;
+ }
pixels -= (6 * width * 3);
height = orig_height - height + 6;
goto next;
@@ -1452,6 +1455,7 @@ next:
mod_y = 0;
}
}
+
goto next;
end:
