about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 32e98824..76ed9b70 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -2849,7 +2849,7 @@ proc loadResource(window: Window; image: HTMLImageElement) =
           return
         let pngData = pngData.get
         let buffer = cast[ptr UncheckedArray[uint8]](pngData.buffer)
-        let high = int(pngData.size - 1)
+        let high = int(pngData.size) - 1
         image.bitmap = fromPNG(toOpenArray(buffer, 0, high))
       )
     window.loadingResourcePromises.add(p)