Skip to content

Commit 715e29f

Browse files
committed
Level check failure in QRinput_new2() on Windows has been fixed.
1 parent 50b3e57 commit 715e29f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Fixed a bug in the calculation of the Micro QR Code's data capacity in
77
QRinput_encodeBitStream().
88
- A test case to test the bugs above has been added.
9+
- Level check failure in QRinput_new2() on Windows has been fixed.
910
* Bumped version to 4.1.1.
1011

1112
2020.08.29 Kentaro Fukuchi <[email protected]>

qrinput.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ QRinput *QRinput_new2(int version, QRecLevel level)
117117
{
118118
QRinput *input;
119119

120-
if(version < 0 || version > QRSPEC_VERSION_MAX || level > QR_ECLEVEL_H) {
120+
if(version < 0 || version > QRSPEC_VERSION_MAX || level < 0 || level > QR_ECLEVEL_H) {
121121
errno = EINVAL;
122122
return NULL;
123123
}

0 commit comments

Comments
 (0)