mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 16:01:17 +00:00
Fix bug #18749 clearing a specific index of an array doesn't work.
The problem was when the cleared index was 0 the entire array was cleared. The fix was to correctly set explicit_index_ to true even when the index is 0.
This commit is contained in:
parent
18dcb1a030
commit
b1826e2a55
@ -832,8 +832,8 @@ void variable_info::init(const config::t_token& varname, bool force_valid, bool
|
||||
//Process the last token
|
||||
|
||||
key = i->token;
|
||||
if(i->index != t_parsed::NO_INDEX && i->index != 0){
|
||||
explicit_index_ = true;
|
||||
explicit_index_ = (i->index != t_parsed::NO_INDEX);
|
||||
if(explicit_index_){
|
||||
size_t size = vars->child_count(key);
|
||||
index = i->index;
|
||||
if(size <= index) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user