Fixed HERETERM_LENGTH_MAX on IL32LLP64
This commit is contained in:
parent
c7f780c155
commit
6a3165e19d
6
parse.y
6
parse.y
@ -613,9 +613,9 @@ struct rb_strterm_heredoc_struct {
|
|||||||
unsigned length /* the length of END in `<<"END"` */
|
unsigned length /* the length of END in `<<"END"` */
|
||||||
#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
|
#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
|
||||||
: HERETERM_LENGTH_BITS
|
: HERETERM_LENGTH_BITS
|
||||||
|
# define HERETERM_LENGTH_MAX ((1U << HERETERM_LENGTH_BITS) - 1)
|
||||||
#else
|
#else
|
||||||
# undef HERETERM_LENGTH_BITS
|
# define HERETERM_LENGTH_MAX UINT_MAX
|
||||||
# define HERETERM_LENGTH_BITS (SIZEOF_INT * CHAR_BIT)
|
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
unsigned quote: 1;
|
unsigned quote: 1;
|
||||||
@ -6850,7 +6850,7 @@ heredoc_identifier(struct parser_params *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
|
len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
|
||||||
if ((unsigned long)len >= 1LU << HERETERM_LENGTH_BITS)
|
if ((unsigned long)len >= HERETERM_LENGTH_MAX)
|
||||||
yyerror(NULL, p, "too long here document identifier");
|
yyerror(NULL, p, "too long here document identifier");
|
||||||
dispatch_scan_event(p, tHEREDOC_BEG);
|
dispatch_scan_event(p, tHEREDOC_BEG);
|
||||||
lex_goto_eol(p);
|
lex_goto_eol(p);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user