fix(wechat_qrcode): Init nBytes after the count value is determined (#3480)
authorNano <nanoapezlk@gmail.com>
Wed, 26 Apr 2023 07:09:52 +0000 (15:09 +0800)
committerMo Zhou <lumin@debian.org>
Mon, 17 Jul 2023 02:20:35 +0000 (03:20 +0100)
commit02a59df2afabf14cf898f6e0b8641973a7b05625
tree66aaa6cb03cfea1a9ffb45f914ff119ec89ef3e6
parent7ebdd1136a8615d0750d7857e315d998b82536f3
fix(wechat_qrcode): Init nBytes after the count value is determined (#3480)

* fix(wechat_qrcode): Initialize nBytes after the count value is determined

* fix(wechat_qrcode): Incorrect count data repair

* chore: format expr

* fix(wechat_qrcode): Avoid null pointer exception

* fix(wechat_qrcode): return when bytes_ is empty

* test(wechat_qrcode): add test case

---------

Co-authored-by: GZTime <Time.GZ@outlook.com>
Gbp-Pq: Name 0009-fix-wechat_qrcode-Init-nBytes-after-the-count-value-.patch
contrib/modules/wechat_qrcode/src/zxing/qrcode/decoder/decoded_bit_stream_parser.cpp
contrib/modules/wechat_qrcode/test/test_qrcode.cpp