diff --git a/ChangeLog b/ChangeLog index 6bb84f92..e7bf3ab0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/qrinput.c b/qrinput.c index d0c066a3..34bedc2a 100644 --- a/qrinput.c +++ b/qrinput.c @@ -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; }