mirror of
https://github.com/danog/liquid.git
synced 2024-12-02 11:17:46 +01:00
1a2066b87e
This commit addresses two issues: 1. For variadic functions 'convertCallArguments' was allocating exactly 'len(args)' arguments, which might be less than required, as a result zero/default filling loop would panic with out of bounds error. 2. Even if we correctly allocate a proper amount of arguments, zero/default filling loop doesn't handle special variadic function type case, when last argument has a slice type and reflect API expects plain values as arguments. But actually we don't need that, because it's okay to omit variadic values altogether, hence the total amount of allocated arguments is max(len(args), rt.NumIn()-1). |
||
---|---|---|
.. | ||
arrays.go | ||
call_test.go | ||
call.go | ||
compare_test.go | ||
compare.go | ||
convert_test.go | ||
convert.go | ||
docs.go | ||
drop_test.go | ||
drop.go | ||
evaluator_test.go | ||
mapslicevalue.go | ||
parsedate_test.go | ||
parsedate.go | ||
predicates_test.go | ||
predicates.go | ||
range.go | ||
sort.go | ||
structvalue_test.go | ||
structvalue.go | ||
value_test.go | ||
value.go |