diff options
| -rw-r--r-- | ext/standard/math.c | 9 |
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) { |
