X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=qobject%2Fjson-lexer.c;h=632320d72d5de5950b3482f492a1e668f6d406c9;hb=HEAD;hp=a7df2093aa3059304450e09f9f81de2a4a1a8d01;hpb=567ea80834fc8ec6b0f143cc884403abd0fde65c;p=mirror_qemu.git diff --git a/qobject/json-lexer.c b/qobject/json-lexer.c index a7df2093aa..51341d96e4 100644 --- a/qobject/json-lexer.c +++ b/qobject/json-lexer.c @@ -139,7 +139,7 @@ static const uint8_t json_lexer[][256] = { * bytes '\xFE', '\xFF'. Structural characters and line * endings are promising resynchronization points. Clients * may use the others to force the JSON parser into known-good - * state; see docs/interop/qmp-spec.txt. + * state; see docs/interop/qmp-spec.rst. */ [0 ... 0x1F] = IN_START | LOOKAHEAD, [0x20 ... 0xFD] = IN_RECOVERY, @@ -266,7 +266,7 @@ static inline uint8_t next_state(JSONLexer *lexer, char ch, bool flush, { uint8_t next; - assert(lexer->state <= ARRAY_SIZE(json_lexer)); + assert(lexer->state < ARRAY_SIZE(json_lexer)); next = json_lexer[lexer->state][(uint8_t)ch]; *char_consumed = !flush && !(next & LOOKAHEAD); return next & ~LOOKAHEAD;