]> granicus.if.org Git - php/commitdiff
MFH
authorfoobar <sniper@php.net>
Fri, 29 Jul 2005 13:00:11 +0000 (13:00 +0000)
committerfoobar <sniper@php.net>
Fri, 29 Jul 2005 13:00:11 +0000 (13:00 +0000)
ext/standard/math.c

index 8278f1a2777ddb4a2aad87c6f608a6875233874f..a851da409b091d0214bcb3b95e984d137d44bed9 100644 (file)
@@ -1139,7 +1139,7 @@ PHP_FUNCTION(number_format)
 
                if (Z_TYPE_PP(d_p) != IS_NULL) { 
                        convert_to_string_ex(d_p);
-                       if (Z_STRLEN_PP(d_p)==1) {
+                       if (Z_STRLEN_PP(d_p)>=1) {
                                dec_point=Z_STRVAL_PP(d_p)[0];
                        } else if (Z_STRLEN_PP(d_p)==0) {
                                dec_point=0;
@@ -1147,7 +1147,7 @@ PHP_FUNCTION(number_format)
                }
                if (Z_TYPE_PP(t_s) != IS_NULL) {
                        convert_to_string_ex(t_s);
-                       if (Z_STRLEN_PP(t_s)==1) {
+                       if (Z_STRLEN_PP(t_s)>=1) {
                                thousand_sep=Z_STRVAL_PP(t_s)[0];
                        } else if(Z_STRLEN_PP(t_s)==0) {
                                thousand_sep=0;