mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-12 04:02:19 +01:00
12 lines
510 B
Diff
12 lines
510 B
Diff
--- a/src/yyjson.c
|
|
+++ b/src/yyjson.c
|
|
@@ -1773,7 +1773,7 @@
|
|
static_inline yyjson_val *ptr_arr_get(yyjson_val *arr, const char *token,
|
|
usize len, usize esc) {
|
|
yyjson_val *val = unsafe_yyjson_get_first(arr);
|
|
- usize num = unsafe_yyjson_get_len(arr), idx;
|
|
+ usize num = unsafe_yyjson_get_len(arr), idx = 0;
|
|
if (unlikely(num == 0)) return NULL;
|
|
if (unlikely(!ptr_token_to_idx(token, len, &idx))) return NULL;
|
|
if (unlikely(idx >= num)) return NULL;
|