diff --git a/src/var.rs b/src/var.rs index 491b5a2..84ec5f0 100644 --- a/src/var.rs +++ b/src/var.rs @@ -564,7 +564,7 @@ impl GameVars { } else if parts.len() > 1 { // we got a key with at least one "$" // 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() { // we got a key like "$foo", just prefix the fallback scope