Skip to content

Commit

Permalink
gh-105390: Add explicit type cast (#105466)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eclips4 committed Jun 7, 2023
1 parent 5394bf9 commit 264a011
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Python/Python-tokenize.c
Expand Up @@ -85,7 +85,8 @@ _tokenizer_error(struct tok_state *tok)
break;
case E_EOF:
PyErr_SetString(PyExc_SyntaxError, "unexpected EOF in multi-line statement");
PyErr_SyntaxLocationObject(tok->filename, tok->lineno, tok->inp - tok->buf < 0 ? 0 : tok->inp - tok->buf);
PyErr_SyntaxLocationObject(tok->filename, tok->lineno,
tok->inp - tok->buf < 0 ? 0 : (int)(tok->inp - tok->buf));
return -1;
case E_DEDENT:
msg = "unindent does not match any outer indentation level";
Expand Down

0 comments on commit 264a011

Please sign in to comment.