operator-dot.go: fixed string index

This commit is contained in:
Celestino Amoroso 2024-05-10 07:32:45 +02:00
parent cf73b5c98d
commit d035fa0d5e

View File

@ -57,7 +57,7 @@ func evalDot(ctx ExprContext, self *term) (v any, err error) {
case string:
var index int
if index, err = verifyIndex(ctx, indexTerm, len(unboxedValue)); err == nil {
v = unboxedValue[index]
v = string(unboxedValue[index])
}
case map[any]any:
var ok bool