Commit 0e431b93 authored by Benjamin Peterson's avatar Benjamin Peterson

fix indentation and add braces

parent a4598a30
......@@ -3091,7 +3091,7 @@ string_expandtabs(PyStringObject *self, PyObject *args)
i = 0; /* chars up to and including most recent \n or \r */
j = 0; /* chars since most recent \n or \r (use in tab calculations) */
e = PyString_AS_STRING(self) + PyString_GET_SIZE(self); /* end of input */
for (p = PyString_AS_STRING(self); p < e; p++)
for (p = PyString_AS_STRING(self); p < e; p++) {
if (*p == '\t') {
if (tabsize > 0) {
incr = tabsize - (j % tabsize);
......@@ -3111,6 +3111,7 @@ string_expandtabs(PyStringObject *self, PyObject *args)
j = 0;
}
}
}
if (i > PY_SSIZE_T_MAX - j)
goto overflow1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment