Mercurial > games > semicongine
changeset 969:2fc5723a5635
fix: classic, off-by-one XD
| author | sam <sam@basx.dev> |
|---|---|
| date | Wed, 03 Apr 2024 19:49:42 +0700 |
| parents | 2f9469f83796 |
| children | 4abb83d6af00 |
| files | semicongine/core/imagetypes.nim |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 =
