cvs: php4 /ext/standard/ math.c

[email protected] ("Zeev Suraski") Fri, 02 Jun 2000 12:24:24 -0000
Newsgroups php.version4
Message-ID <cvszeev959948664@cvsserver>
zeev		Fri Jun  2 05:24:24 2000 EDT

  Modified files:
    /php4/ext/standard	math.c 
  Log:
  Small optimization
  
  
Index: php4/ext/standard/math.c
diff -u php4/ext/standard/math.c:1.26 php4/ext/standard/math.c:1.27
--- php4/ext/standard/math.c:1.26	Thu May 18 08:34:35 2000
+++ php4/ext/standard/math.c	Fri Jun  2 05:24:24 2000
@@ -636,9 +636,12 @@
 		return tmpbuf;
 	}
 
-	for (t=tmpbuf; *t; t++) {
-		if (*t=='.') {
-			*t = dec_point;
+	if (dec_point!='.') {
+		for (t=tmpbuf; *t; t++) {
+			if (*t=='.') {
+				*t = dec_point;
+				break;
+			}
 		}
 	}
 	if (dec) {