Skip to content

Commit

Permalink
Fixed array index out of bounds in operator[]
Browse files Browse the repository at this point in the history
  • Loading branch information
canh committed May 14, 2012
1 parent e7952d0 commit 32961a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json.h
Expand Up @@ -130,7 +130,7 @@ typedef struct _json_value
inline const struct _json_value &operator [] (int index) const
{
if (type != json_array || index < 0
|| ((unsigned int) index) > u.array.length)
|| ((unsigned int) index) >= u.array.length)
{
return json_value_none;
}
Expand Down

0 comments on commit 32961a4

Please sign in to comment.