diff -r 829117ae2e55 Parser/parsetok.c --- a/Parser/parsetok.c Tue Jul 19 16:46:09 2016 -0500 +++ b/Parser/parsetok.c Thu Jul 21 23:45:13 2016 +1000 @@ -320,7 +320,7 @@ if (tok->buf != NULL) { size_t len; assert(tok->cur - tok->buf < INT_MAX); - err_ret->offset = (int)(tok->cur - tok->buf); + err_ret->offset = (int)(tok->start - tok->buf + 1); len = tok->inp - tok->buf; err_ret->text = (char *) PyObject_MALLOC(len + 1); if (err_ret->text != NULL) {