# HG changeset patch # User sam # Date 1712148582 -25200 # Node ID 2fc5723a5635b238e3ca5ccba1d216ed8fa0a63c # Parent 2f9469f8379653e408b3759cc99881a2b4bba807 fix: classic, off-by-one XD diff -r 2f9469f83796 -r 2fc5723a5635 semicongine/core/imagetypes.nim --- a/semicongine/core/imagetypes.nim Wed Apr 03 16:00:33 2024 +0700 +++ b/semicongine/core/imagetypes.nim Wed Apr 03 19:49:42 2024 +0700 @@ -71,7 +71,7 @@ proc asLinear*[T](image: Image[T]): Image[T] = result = Image[T](width: image.width, height: image.height, imagedata: newSeq[T](image.imagedata.len)) - for i in 0 .. image.imagedata.len: + for i in 0 ..< image.imagedata.len: result.imagedata[i] = srgb2linear(image.imagedata[i]) proc `$`*(image: Image): string =