summaryrefslogtreecommitdiff
path: root/packages/fcl-image/src/fpreadpnm.pp
diff options
context:
space:
mode:
Diffstat (limited to 'packages/fcl-image/src/fpreadpnm.pp')
-rw-r--r--packages/fcl-image/src/fpreadpnm.pp8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/fcl-image/src/fpreadpnm.pp b/packages/fcl-image/src/fpreadpnm.pp
index 754ea10c51..3b9d6a56c0 100644
--- a/packages/fcl-image/src/fpreadpnm.pp
+++ b/packages/fcl-image/src/fpreadpnm.pp
@@ -229,13 +229,13 @@ Var
L:=P^;
for j:=0 to 7 do
begin
- if odd(L)
- then
+ if x < FWidth then
+ if odd(L) then
Img.Colors[x,Row]:=colBlack
else
Img.Colors[x,Row]:=colWhite;
- L:=L shr 1;
- dec(x);
+ L:=L shr 1;
+ dec(x);
end;
Inc(P);
Inc(x,16);