]> granicus.if.org Git - php/commitdiff
php_u_trim_range(): Alloc UChar32 units rather than UChar
authorRolland Santimano <rolland@php.net>
Wed, 17 Aug 2005 10:26:02 +0000 (10:26 +0000)
committerRolland Santimano <rolland@php.net>
Wed, 17 Aug 2005 10:26:02 +0000 (10:26 +0000)
ext/standard/string.c

index 376f6585cef0265cf4d8567381c7de6bd6690483..84f96d80ec99c1f2377ad70941d9a19f2ba8453a 100644 (file)
@@ -610,7 +610,7 @@ static int php_expand_u_trim_range(UChar **range, int32_t *range_len TSRMLS_DC)
                c = input[0];
                if ( (input+3 < end) && input[1] == '.' && input[2] == '.' && input[3] >= c ) {
                        tmp_len += (input[3] - c + 1);
-                       tmp = (UChar32 *)erealloc(tmp, tmp_len*sizeof(UChar));
+                       tmp = (UChar32 *)erealloc(tmp, tmp_len*sizeof(UChar32));
                        for ( ; c <= input[3] ; c++ ) {
                                if ( U_IS_UNICODE_CHAR(c) ) tmp[idx++] = c;
                        }