From f9b08dc59f5528f7ffd655773400b1b915edcab8 Mon Sep 17 00:00:00 2001 From: Nghia Truong Date: Mon, 15 Jul 2024 21:55:30 -0700 Subject: [PATCH] Fix completion condition for array-wildcard cases Signed-off-by: Nghia Truong --- src/main/cpp/src/get_json_object.cu | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/cpp/src/get_json_object.cu b/src/main/cpp/src/get_json_object.cu index 3a0fcc8fa8..47b1245307 100644 --- a/src/main/cpp/src/get_json_object.cu +++ b/src/main/cpp/src/get_json_object.cu @@ -609,13 +609,14 @@ __device__ bool evaluate_path(json_parser& p, // add outer array tokens ctx.g.write_child_raw_value( child_g_start, child_g_len, /* write_outer_array_tokens */ true); - ctx.task_is_done = true; } else if (ctx.dirty == 1) { // remove outer array tokens ctx.g.write_child_raw_value( child_g_start, child_g_len, /* write_outer_array_tokens */ false); - ctx.task_is_done = true; } // else do not write anything + + // Done anyway, since we already reached the end array. + ctx.task_is_done = true; } } // case (START_ARRAY, Wildcard :: xs)