Permalink
Browse files

Fixed array index out of bounds in operator[]

  • Loading branch information...
canh committed May 14, 2012
1 parent e7952d0 commit 32961a43a90c500b6b11f4be2b2cbbf1c2eec702
Showing with 1 addition and 1 deletion.
  1. +1 −1 json.h
View
2 json.h
@@ -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;
}

0 comments on commit 32961a4

Please sign in to comment.