diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-24 19:12:29 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-25 13:07:10 +0900 |
| commit | 8de8521cb62dd9f26a7b13aff94c3f178caa7a42 (patch) | |
| tree | 04ef2b682150491642ab57cc80f1df3dc3d699dc /mrbgems/mruby-compiler/core/parse.y | |
| parent | 5c804cf68f2b7e80780d3d812efb70ef9e376c08 (diff) | |
| download | mruby-8de8521cb62dd9f26a7b13aff94c3f178caa7a42.tar.gz mruby-8de8521cb62dd9f26a7b13aff94c3f178caa7a42.zip | |
parse.y: replace `strtoul()` by `mrb_int_read()`.
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 00d40ec64..c59a8e480 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -13,7 +13,6 @@ #include <ctype.h> #include <errno.h> -#include <stdlib.h> #include <string.h> #include <mruby.h> #include <mruby/compile.h> @@ -6264,7 +6263,7 @@ parser_yylex(parser_state *p) if (last_state == EXPR_FNAME) goto gvar; tokfix(p); { - unsigned long n = strtoul(tok(p), NULL, 10); + unsigned long n = mrb_int_read(tok(p), NULL, NULL); if (n > INT_MAX) { yyerror(p, "capture group index must be <= " MRB_STRINGIZE(INT_MAX)); return 0; |
