diff options
Diffstat (limited to 'ext/psych/yaml/scanner.c')
-rw-r--r-- | ext/psych/yaml/scanner.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/psych/yaml/scanner.c b/ext/psych/yaml/scanner.c index e80ec5ae6a..2ca3fed62f 100644 --- a/ext/psych/yaml/scanner.c +++ b/ext/psych/yaml/scanner.c @@ -1231,12 +1231,14 @@ yaml_parser_roll_indent(yaml_parser_t *parser, ptrdiff_t column, if (!PUSH(parser, parser->indents, parser->indent)) return 0; +#if PTRDIFF_MAX > INT_MAX if (column > INT_MAX) { parser->error = YAML_MEMORY_ERROR; return 0; } +#endif - parser->indent = column; + parser->indent = (int)column; /* Create a token and insert it into the queue. */ |