🐛 Stop multimap decode from spinning on truncated data

A failed or zero-length run read left the decoder looping forever
without consuming input.
This commit is contained in:
2026-11-15 22:06:51 +01:00
parent d3045de064
commit d5c41c0816
+7 -1
View File
@@ -69,7 +69,13 @@ begin
begin
while (x < width) and (y < height) do
begin
Data.Read(pixelData, SizeOf(Byte));
if (Data.Read(pixelData, SizeOf(Byte)) < SizeOf(Byte)) or
(pixelData and $7F = 0) then
begin
x := width;
y := height;
Break;
end;
if (pixelData and $80) = $80 then color := clBlack else color := clWhite;
for run := 1 to (pixelData and $7F) do
begin