toJSON: pass pos in case of a list as well

This commit is contained in:
Shay Bergmann 2021-10-26 14:43:15 +00:00
parent ba81e871b2
commit 769de259f0
No known key found for this signature in database
GPG key ID: 4D33B73FFDB9217C

View file

@ -65,7 +65,7 @@ void printValueAsJSON(EvalState & state, bool strict,
auto list(out.list());
for (unsigned int n = 0; n < v.listSize(); ++n) {
auto placeholder(list.placeholder());
printValueAsJSON(state, strict, *v.listElems()[n], noPos, placeholder, context);
printValueAsJSON(state, strict, *v.listElems()[n], pos, placeholder, context);
}
break;
}