Skip to content

Commit e4b0327

Browse files
authored
Merge pull request #518 from treeform/guzba
5.0.4
2 parents cc68309 + b7a2739 commit e4b0327

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pixie.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "5.0.3"
1+
version = "5.0.4"
22
author = "Andre von Houck and Ryan Oldenburg"
33
description = "Full-featured 2d graphics library for Nim."
44
license = "MIT"

src/pixie/fileformats/jpeg.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,13 @@ proc reset(state: var DecoderState) =
444444
proc decodeSOS(state: var DecoderState) =
445445
## Decode Start of Scan - header before the block data.
446446
var len = state.readUint16be() - 2
447-
let scanComponentsU8 = state.readUint8()
448-
state.scanComponents = scanComponentsU8.int
447+
448+
state.scanComponents = state.readUint8().int
449449

450450
if state.scanComponents > state.components.len:
451451
failInvalid("extra components")
452452

453-
if scanComponentsU8 notin {1'u8, 3}:
453+
if cast[uint8](state.scanComponents) notin {1'u8, 3}:
454454
failInvalid("unsupported scan component count")
455455

456456
state.componentOrder.setLen(0)

0 commit comments

Comments
 (0)