String index out of range

After upgrading to 6.5.2, one of our auto indexes errors out like this:
exception: String index out of range: 4

Could someone point me out what to look for? What does this number 4 mean?

Auto slot correctly returns items, so it’s gotta be somewhere in my processing code on the template.

Thanks.

Cancel that - there was some bad data entered.