commit | b4c8d83eabae7bda250b0621d66a03d54b531c4a | [log] [tgz] |
---|---|---|
author | Marti Bolivar <marti.bolivar@linaro.org> | Wed Jun 07 14:07:45 2017 -0400 |
committer | Anas Nashif <nashif@linux.intel.com> | Thu Jun 08 15:11:23 2017 -0400 |
tree | 3316e2c6d37565ebcfc82b44e43bcd4d472602bc | |
parent | 2620ae093286674f8d5aa85d01eeb8afd53a4692 [diff] |
lib: json: fix arr_parse() This function currently fails when decoding an array with number of elements exactly equal to the maximum available in the struct. To fix this, move the check for if the current field is past the end of the array to just before attempting to decode a value. This allows the last element to be followed by a JSON_TOK_LIST_END token in the case that the array is full, and the function to return success. Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>