]> granicus.if.org Git - php/commitdiff
no space for comma separated encoding lists
authorMarcus Boerger <helly@php.net>
Fri, 5 Apr 2002 16:24:08 +0000 (16:24 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 5 Apr 2002 16:24:08 +0000 (16:24 +0000)
ext/mbstring/mbstring.c

index 6da2b546a090494dfab935b389fcdf06927cda8a..c80e9e13eddbf2ea86b0542241980d5b145f7042 100644 (file)
@@ -2144,9 +2144,9 @@ PHP_FUNCTION(mb_convert_encoding)
                                if ( _from_encodings) {
                                        l = strlen(_from_encodings);
                                        n = strlen(Z_STRVAL_PP(hash_entry));
-                                       _from_encodings = erealloc(_from_encodings, l+n+3);
-                                       strcpy(_from_encodings+l,", ");
-                                       strcpy(_from_encodings+l+2,Z_STRVAL_PP(hash_entry));
+                                       _from_encodings = erealloc(_from_encodings, l+n+2);
+                                       strcpy(_from_encodings+l,",");
+                                       strcpy(_from_encodings+l+1,Z_STRVAL_PP(hash_entry));
                                } else {
                                        _from_encodings = estrdup(Z_STRVAL_PP(hash_entry));
                                }