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:
Thonsew 2011-09-29 15:55:48 +00:00
parent 18dcb1a030
commit b1826e2a55

View File

@ -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) {