about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/img/png.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/img/png.nim b/src/img/png.nim
index db1fa5a9..667b589f 100644
--- a/src/img/png.nim
+++ b/src/img/png.nim
@@ -154,7 +154,7 @@ template readStr(reader: var PNGReader; L: int): string =
   s
 
 template readU8(reader: var PNGReader): uint8 =
-  if reader.i > reader.limit:
+  if reader.i >= reader.limit:
     reader.err "too short"
   let x = reader.iq[reader.i]
   inc reader.i