diff options
Diffstat (limited to 'src/img/bitmap.nim')
-rw-r--r-- | src/img/bitmap.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/img/bitmap.nim b/src/img/bitmap.nim index f944ad59..7c694370 100644 --- a/src/img/bitmap.nim +++ b/src/img/bitmap.nim @@ -175,7 +175,7 @@ type PNGWriter = object outlen: int func pngInt(i: uint32): auto = - doAssert i < uint32(2 ^ 31) + doAssert i < uint32(2) ^ 31 return i.toBytesBE() func oq(writer: PNGWriter): ptr UncheckedArray[uint8] = @@ -192,7 +192,7 @@ proc writeInt(writer: var PNGWriter, i: uint32) = writer.writeStr(i.toBytesBE()) proc writePngInt(writer: var PNGWriter, i: uint32) = - doAssert i < uint32(2 ^ 31) + doAssert i < uint32(2) ^ 31 writer.writeInt(i) proc writeChunk[T](writer: var PNGWriter, t: string, data: T) = @@ -334,7 +334,7 @@ template readU32(reader: var PNGReader): uint32 = template readPNGInt(reader: var PNGReader): uint32 = let x = reader.readU32() - if x >= uint32(2 ^ 31): + if x >= uint32(2) ^ 31: reader.err "int too large" x |