mirror of
https://gitlab.com/jessieh/qrprinter.git
synced 2024-09-08 01:51:46 +00:00
Fix segfault when encoding 0-length string
This commit is contained in:
parent
d53b412e06
commit
3a83ed14e0
@ -81,7 +81,9 @@ Black modules will be printed as `black_cell`, and white modules will be printed
|
||||
(fn encode_string [string]
|
||||
"Encode string `string` into a table representing a QR code.
|
||||
Returns a 2D sequential table of true/false values representing black/white QR modules."
|
||||
(qrencode.encode_string_8_bit string))
|
||||
(if (~= (string.len string) 0)
|
||||
(qrencode.encode_string_8_bit string)
|
||||
nil))
|
||||
|
||||
(fn print_qr_ascii [qr options]
|
||||
"Print QR code `qr` to stdout using ASCII characters."
|
||||
|
Loading…
Reference in New Issue
Block a user