[asterisk-commits] tilghman: branch 1.4 r67162 - in /branches/1.4: ./ funcs/func_math.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jun 4 16:43:01 MST 2007


Author: tilghman
Date: Mon Jun  4 18:43:01 2007
New Revision: 67162

URL: http://svn.digium.com/view/asterisk?view=rev&rev=67162
Log:
Merged revisions 67161 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r67161 | tilghman | 2007-06-04 18:41:49 -0500 (Mon, 04 Jun 2007) | 2 lines

According to MATH, 0+1181000386 = 1181000448.  Oops.

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/funcs/func_math.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/funcs/func_math.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/funcs/func_math.c?view=diff&rev=67162&r1=67161&r2=67162
==============================================================================
--- branches/1.4/funcs/func_math.c (original)
+++ branches/1.4/funcs/func_math.c Mon Jun  4 18:43:01 2007
@@ -64,9 +64,9 @@
 static int math(struct ast_channel *chan, char *cmd, char *parse,
 		char *buf, size_t len)
 {
-	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;
@@ -165,12 +165,12 @@
 		return -1;
 	}
 
-	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 -1;
 	}
 
-	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 -1;
 	}



More information about the asterisk-commits mailing list