Skip to content

Commit

Permalink
Level check failure in QRinput_new2() on Windows has been fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukuchi committed Sep 28, 2020
1 parent 50b3e57 commit 715e29f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Fixed a bug in the calculation of the Micro QR Code's data capacity in
QRinput_encodeBitStream().
- A test case to test the bugs above has been added.
- Level check failure in QRinput_new2() on Windows has been fixed.
* Bumped version to 4.1.1.

2020.08.29 Kentaro Fukuchi <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion qrinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ QRinput *QRinput_new2(int version, QRecLevel level)
{
QRinput *input;

if(version < 0 || version > QRSPEC_VERSION_MAX || level > QR_ECLEVEL_H) {
if(version < 0 || version > QRSPEC_VERSION_MAX || level < 0 || level > QR_ECLEVEL_H) {
errno = EINVAL;
return NULL;
}
Expand Down

0 comments on commit 715e29f

Please sign in to comment.