summaryrefslogtreecommitdiffstats
path: root/Parser/pegen/pegen.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/pegen/pegen.c')
-rw-r--r--Parser/pegen/pegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/pegen/pegen.c b/Parser/pegen/pegen.c
index efcf9ac..2e986c5 100644
--- a/Parser/pegen/pegen.c
+++ b/Parser/pegen/pegen.c
@@ -1225,7 +1225,7 @@ _PyPegen_run_parser_from_string(const char *str, int start_rule, PyObject *filen
int exec_input = start_rule == Py_file_input;
struct tok_state *tok;
- if (flags == NULL || flags->cf_flags & PyCF_IGNORE_COOKIE) {
+ if (flags != NULL && flags->cf_flags & PyCF_IGNORE_COOKIE) {
tok = PyTokenizer_FromUTF8(str, exec_input);
} else {
tok = PyTokenizer_FromString(str, exec_input);