diff options
Diffstat (limited to 'src/libnmc-base')
| -rw-r--r-- | src/libnmc-base/qrcodegen.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnmc-base/qrcodegen.h b/src/libnmc-base/qrcodegen.h index 46d986a3..26c842cd 100644 --- a/src/libnmc-base/qrcodegen.h +++ b/src/libnmc-base/qrcodegen.h @@ -130,7 +130,7 @@ struct qrcodegen_Segment { // as a compile-time constant. For example, 'uint8_t buffer[qrcodegen_BUFFER_LEN_FOR_VERSION(25)];' // can store any single QR Code from version 1 to 25 (inclusive). The result fits in an int (or int16). // Requires qrcodegen_VERSION_MIN <= n <= qrcodegen_VERSION_MAX. -#define qrcodegen_BUFFER_LEN_FOR_VERSION(n) ((((n) *4 + 17) * ((n) *4 + 17) + 7) / 8 + 1) +#define qrcodegen_BUFFER_LEN_FOR_VERSION(n) ((((n) * 4 + 17) * ((n) * 4 + 17) + 7) / 8 + 1) // The worst-case number of bytes needed to store one QR Code, up to and including // version 40. This value equals 3918, which is just under 4 kilobytes. |