Skip to content

Commit 5fa5ae4

Browse files
committed
Make range of small int 24 bits.
1 parent 39cf328 commit 5fa5ae4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static void push_result_token(parser_t *parser, const py_lexer_t *lex) {
228228
}
229229
if (dec) {
230230
pn = py_parse_node_new_leaf(PY_PARSE_NODE_DECIMAL, qstr_from_strn_copy(str, len));
231-
} else if (small_int && -0x10000000 <= int_val && int_val <= 0xfffffff) { // XXX check this range formula!
231+
} else if (small_int && -0x800000 <= int_val && int_val <= 0x7fffff) { // XXX check this range formula!
232232
pn = py_parse_node_new_leaf(PY_PARSE_NODE_SMALL_INT, int_val);
233233
} else {
234234
pn = py_parse_node_new_leaf(PY_PARSE_NODE_INTEGER, qstr_from_strn_copy(str, len));

0 commit comments

Comments
 (0)