fix token consumption so we dont get random data at the end
This commit is contained in:
@@ -203,6 +203,16 @@ parse_key_condition_expression :: proc(
|
||||
sk_condition = skc
|
||||
}
|
||||
|
||||
// Verify all tokens were consumed (no trailing garbage)
|
||||
if trailing := tokenizer_next(&t); trailing != nil {
|
||||
delete(pk_name)
|
||||
attr_value_destroy(&pk_value)
|
||||
if skc, has_skc := sk_condition.?; has_skc {
|
||||
skc_copy := skc
|
||||
sort_key_condition_destroy(&skc_copy)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
kc = Key_Condition{
|
||||
pk_name = pk_name,
|
||||
|
||||
Reference in New Issue
Block a user