> On 4 Nov 2024, at 06:00, jian he <jian.universal...@gmail.com> wrote:
> + if (cnt != 1) > + { > + /* > + * Either the lexer screwed up or our assumption above isn't true, and > + * either way a developer needs to take a look. > + */ > + Assert(cnt == 1); > + return 1; /* don't fall through in release builds */ > + } > The above Assert looks very wrong to me. I think the point is to fail hard in development builds to ensure whatever caused the disconnect between the json lexer and sscanf parsing is looked at. It should probably be changed to Assert(false); which is the common pattern for erroring out like this. -- Daniel Gustafsson