summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 1d1d531..090cc1f 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -762,6 +762,8 @@ PyUnicode_FromFormatV(const char *format, va_list vargs)
f++;
while (*f && *f != '%' && !Py_ISALPHA((unsigned)*f))
f++;
+ if (!*f)
+ break;
if (*f == 's' || *f=='S' || *f=='R' || *f=='A' || *f=='V')
++callcount;
}