[asterisk-commits] tilghman: branch 1.2 r67161 -
/branches/1.2/funcs/func_math.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jun 4 16:41:49 MST 2007
Author: tilghman
Date: Mon Jun 4 18:41:49 2007
New Revision: 67161
URL: http://svn.digium.com/view/asterisk?view=rev&rev=67161
Log:
According to MATH, 0+1181000386 = 1181000448. Oops.
Modified:
branches/1.2/funcs/func_math.c
Modified: branches/1.2/funcs/func_math.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/funcs/func_math.c?view=diff&rev=67161&r1=67160&r2=67161
==============================================================================
--- branches/1.2/funcs/func_math.c (original)
+++ branches/1.2/funcs/func_math.c Mon Jun 4 18:41:49 2007
@@ -67,9 +67,9 @@
int argc;
char *argv[2];
char *args;
- float fnum1;
- float fnum2;
- float ftmp = 0;
+ double fnum1;
+ double fnum2;
+ double ftmp = 0;
char *op;
int iaction=-1;
int type_of_result=FLOAT_RESULT;
@@ -159,12 +159,12 @@
return NULL;
}
- if (sscanf(mvalue1, "%f", &fnum1) != 1) {
+ if (sscanf(mvalue1, "%lf", &fnum1) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue1);
return NULL;
}
- if (sscanf(mvalue2, "%f", &fnum2) != 1) {
+ if (sscanf(mvalue2, "%lf", &fnum2) != 1) {
ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue2);
return NULL;
}
More information about the asterisk-commits
mailing list