summaryrefslogtreecommitdiff
path: root/ext/standard/math.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-06-02 12:24:24 +0000
committerZeev Suraski <zeev@php.net>2000-06-02 12:24:24 +0000
commitab36e22aebb8c87cf38d4f1dd78ea7d0682284a1 (patch)
tree150adde59296b9123fd4eea59d7689b08e5c6f1d /ext/standard/math.c
parent8a8c3eafc8760efd0cac6fa40ba198dacb036e96 (diff)
downloadphp-git-ab36e22aebb8c87cf38d4f1dd78ea7d0682284a1.tar.gz
Small optimization
Diffstat (limited to 'ext/standard/math.c')
-rw-r--r--ext/standard/math.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 5663634e02..fef8cf0388 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -636,9 +636,12 @@ char *_php_math_number_format(double d,int dec,char dec_point,char thousand_sep)
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) {