[asterisk-commits] tilghman: trunk r67164 - in /trunk: ./ funcs/func_math.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Jun 4 16:45:06 MST 2007


Author: tilghman
Date: Mon Jun  4 18:45:05 2007
New Revision: 67164

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

................
r67162 | tilghman | 2007-06-04 18:43:01 -0500 (Mon, 04 Jun 2007) | 10 lines

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:
    trunk/   (props changed)
    trunk/funcs/func_math.c

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

Modified: trunk/funcs/func_math.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_math.c?view=diff&rev=67164&r1=67163&r2=67164
==============================================================================
--- trunk/funcs/func_math.c (original)
+++ trunk/funcs/func_math.c Mon Jun  4 18:45:05 2007
@@ -70,9 +70,9 @@
 static int math(struct ast_channel *chan, const 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;
@@ -180,12 +180,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