From 502220cf4170dc647b2723c23400c2104a978a13 Mon Sep 17 00:00:00 2001 From: 0xPxt Date: Mon, 2 Sep 2024 07:45:18 +0200 Subject: [PATCH] fix cpp_test --- tests/ui_tests.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/ui_tests.cpp b/tests/ui_tests.cpp index 280704a..c56ff8c 100644 --- a/tests/ui_tests.cpp +++ b/tests/ui_tests.cpp @@ -93,12 +93,10 @@ void check_testcase(const testcase_t &tc, bool expert_mode) { parser_error_t err; uint8_t buffer[5000]; + MEMZERO(buffer, sizeof(buffer)); uint16_t bufferLen = parseHexString(buffer, sizeof(buffer), tc.blob.c_str()); - tx_json_t tx_obj; - memset(&tx_obj, 0, sizeof(tx_obj)); - - err = parser_parse(&ctx, buffer, bufferLen, &tx_obj); + err = parser_parse(&ctx, buffer, strlen((char *)buffer), tx_type_json); ASSERT_EQ(err, parser_ok) << parser_getErrorDescription(err); auto output = dumpUI(&ctx, 39, 39);