diff options
author | Guido van Rossum <guido@python.org> | 2000-05-01 21:27:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-05-01 21:27:20 (GMT) |
commit | 0e4f657a50e45922fbf029e8e4e6ecf0cbb6ddef (patch) | |
tree | a517c2aa6e8bf4469d2b97e7edf618d84983a4dd /Objects/unicodeobject.c | |
parent | 96774c1347a9849fb49b006b5451c8d156c51446 (diff) | |
download | cpython-0e4f657a50e45922fbf029e8e4e6ecf0cbb6ddef.zip cpython-0e4f657a50e45922fbf029e8e4e6ecf0cbb6ddef.tar.gz cpython-0e4f657a50e45922fbf029e8e4e6ecf0cbb6ddef.tar.bz2 |
Marc-Andre Lemburg:
Fixed \OOO interpretation for Unicode objects. \777 now
correctly produces the Unicode character with ordinal 511.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9ed2336..7a68dd4 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1016,13 +1016,13 @@ PyObject *PyUnicode_DecodeUnicodeEscape(const char *s, /* \OOO (octal) escapes */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': - c = s[-1] - '0'; + x = s[-1] - '0'; if ('0' <= *s && *s <= '7') { - c = (c<<3) + *s++ - '0'; + x = (x<<3) + *s++ - '0'; if ('0' <= *s && *s <= '7') - c = (c<<3) + *s++ - '0'; + x = (x<<3) + *s++ - '0'; } - *p++ = c; + *p++ = x; break; /* \xXXXX escape with 0-4 hex digits */ |