Implicit fallthrough?
r-barnes opened this issue · 2 comments
r-barnes commented
Is there supposed to be a fallthrough on this line?
*endptr = s++;
switch (**endptr) {
case '-':
if (!isdigit(*s) && *s != '.') {
*endptr = s;
return JSON_BAD_NUMBER;
}
// Should I fallthrough here?
case '0':
case '1':
case '2':
case '3':
vivkin commented
Yes. Then call to string2double(*endptr...) where '-' handled properly. This cases [-0-9]
for parsing numbers