quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

commit 63b0b8e6d0a1e0d5f0b8d36e02bac66daa2d1101
parent 32e65cc1cd08d050ad6029b009c37cac9566ed0e
Author: Charlie Gordon <github@chqrlie.org>
Date:   Sun,  3 Mar 2024 03:38:49 +0100

fix microbench when microbench.txt is missing (#246)


Diffstat:
Mquickjs/tests/microbench.js | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/quickjs/tests/microbench.js b/quickjs/tests/microbench.js @@ -1134,11 +1134,12 @@ function load_result(filename) if (typeof std !== "undefined") { // read the file in QuickJS var f = std.open(filename, "r"); - if (!f) { + if (f) { + str = f.readAsString(); + f.close(); + } else { has_error = true; } - str = f.readAsString(); - f.close(); } else { return null; }