]> granicus.if.org Git - php/commitdiff
MFH; we would see a nasty problem again if it was not fixed...
authorMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 24 Oct 2002 02:56:28 +0000 (02:56 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 24 Oct 2002 02:56:28 +0000 (02:56 +0000)
main/rfc1867.c

index 7f393c6ec34d8e973f33896a524eec96ebc56fff..5d7bd78d4e541eaa7fccdcec8c86c033955e8587 100644 (file)
@@ -510,13 +510,15 @@ static char *substring_conf(char *start, int len, char quote TSRMLS_DC)
                if (start[i] == '\\' && (start[i + 1] == '\\' || (quote && start[i + 1] == quote))) {
                        *resp++ = start[++i];
                } else {
-                       *resp++ = start[i];
 #if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
                        if (php_mb_encoding_translation(TSRMLS_C)) {
                                size_t j = php_mb_mbchar_bytes(start+i TSRMLS_CC);
                                while (j-- > 0) {
-                                       *resp++ = start[++i];
+                                       *resp++ = start[i++];
                                }
+                               --i;
+                       } else {
+                               *resp++ = start[i];
                        }
 #endif
                }