From 58c00fd81ce1824037749ab0e900024811dc9f31 Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Mon, 15 Apr 2024 14:55:24 +0200 Subject: FIX Beautify JSON usernote --- modules/benchmark.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/benchmark.c b/modules/benchmark.c index f60bb8c7..f4629866 100644 --- a/modules/benchmark.c +++ b/modules/benchmark.c @@ -823,7 +823,11 @@ static gchar *get_benchmark_results(gsize *len) ADD_JSON_VALUE(string, "LinuxOS", this_machine->linux_os); ADD_JSON_VALUE(boolean, "Legacy", FALSE); ADD_JSON_VALUE(string, "ExtraInfo", bench_results[i].extra); - ADD_JSON_VALUE(string, "UserNote", params.bench_user_note); + if(params.bench_user_note){ + ADD_JSON_VALUE(string, "UserNote", params.bench_user_note); + }else{ + ADD_JSON_VALUE(string, "UserNote", ""); + } ADD_JSON_VALUE(double, "BenchmarkResult", bench_results[i].result); ADD_JSON_VALUE(double, "ElapsedTime", bench_results[i].elapsed_time); ADD_JSON_VALUE(int, "UsedThreads", bench_results[i].threads_used); -- cgit v1.2.3