quirc: use ps_malloc() more

This commit is contained in:
Thomas Farstrike
2025-05-12 20:41:48 +02:00
parent 84baebd8dd
commit 11af02e80f
4 changed files with 9 additions and 5 deletions
@@ -55,12 +55,13 @@ def qr_button_click(e):
height = 240
buffer_size = width * height # 240 * 240 = 57600 bytes
try:
import qrdecode
result = qrdecode.qrdecode(current_cam_buffer, width, height)
if result.startswith('\ufeff'): # Remove BOM (\ufeff) from the start of the decoded string, if present
result = result[1:]
print(f"QR decoding found: {result}")
except ValueError as e:
print("Error:", e)
except Exception as e:
print("QR decode error: ", e)
raise