fix off-by-one error in GameVars::normalize_varname()
This commit is contained in:
parent
0c622f28ab
commit
9e121cf633
|
@ -564,7 +564,7 @@ impl GameVars {
|
||||||
} else if parts.len() > 1 {
|
} else if parts.len() > 1 {
|
||||||
// we got a key with at least one "$"
|
// we got a key with at least one "$"
|
||||||
// extract anything before the last "$":
|
// extract anything before the last "$":
|
||||||
let scope_part: String = parts[0..parts.len() - 2].join(SCOPE_SEPARATOR);
|
let scope_part: String = parts[0..parts.len() - 1].join(SCOPE_SEPARATOR);
|
||||||
|
|
||||||
if scope_part.is_empty() {
|
if scope_part.is_empty() {
|
||||||
// we got a key like "$foo", just prefix the fallback scope
|
// we got a key like "$foo", just prefix the fallback scope
|
||||||
|
|
Loading…
Reference in a new issue