about summary refs log tree commit diff stats
path: root/src/img
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-10-21 10:35:14 +0200
committerbptato <nincsnevem662@gmail.com>2023-10-21 10:35:14 +0200
commit4d7729c010359ef6372f96ea0d47a470c3cc2cda (patch)
tree9674eba4228eb01ae59205efb813b8089c444170 /src/img
parentf447a99aca3657df4d896fb30e435f7f627e94a7 (diff)
downloadchawan-4d7729c010359ef6372f96ea0d47a470c3cc2cda.tar.gz
warn on eprint in release mode
Maybe it's easier to avoid accidentally including like this
Diffstat (limited to 'src/img')
-rw-r--r--src/img/png.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/img/png.nim b/src/img/png.nim
index 416c4541..bde2cecb 100644
--- a/src/img/png.nim
+++ b/src/img/png.nim
@@ -138,7 +138,8 @@ func scanlen(reader: PNGReader): int {.inline.} =
   return (w * reader.spp * int(reader.bitDepth) + 7) div 8
 
 proc handleError(reader: var PNGReader, msg: string) =
-  eprint msg
+  #TODO proper error handling?
+  stderr.write(msg & "\n")
   reader.bmp = nil
   if reader.hasstrm:
     discard inflateEnd(addr reader.strm)