Skip to content

Commit 0ead8a7

Browse files
committed
getindices() now returns positional index from a list
Ticket: CFE-2930 Changelog: Title Signed-off-by: Bastian Triller <bastian.triller@gmail.com>
1 parent 824bd0c commit 0ead8a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libpromises/evalfunction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3037,7 +3037,7 @@ static FnCallResult FnCallGetIndices(EvalContext *ctx, ARG_UNUSED const Policy *
30373037
EvalContextVariableGet(ctx, ref, &type);
30383038

30393039
/* A variable holding a data container. */
3040-
if (type == CF_DATA_TYPE_CONTAINER)
3040+
if (DataTypeToRvalType(type) == RVAL_TYPE_CONTAINER || DataTypeToRvalType(type) == RVAL_TYPE_LIST)
30413041
{
30423042
json = VarRefValueToJson(ctx, fp, ref, NULL, 0, true, &allocated);
30433043
}

0 commit comments

Comments
 (0)