[svn-commits] tilghman: trunk r241766 - in /trunk: ./ funcs/func_math.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jan 20 23:54:32 CST 2010
Author: tilghman
Date: Wed Jan 20 23:54:30 2010
New Revision: 241766
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=241766
Log:
Merged revisions 241765 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r241765 | tilghman | 2010-01-20 23:53:17 -0600 (Wed, 20 Jan 2010) | 2 lines
Guard against division by zero.
........
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://svnview.digium.com/svn/asterisk/trunk/funcs/func_math.c?view=diff&rev=241766&r1=241765&r2=241766
==============================================================================
--- trunk/funcs/func_math.c (original)
+++ trunk/funcs/func_math.c Wed Jan 20 23:54:30 2010
@@ -289,7 +289,11 @@
int inum1 = fnum1;
int inum2 = fnum2;
- ftmp = (inum1 % inum2);
+ if (inum2 == 0) {
+ ftmp = 0;
+ } else {
+ ftmp = (inum1 % inum2);
+ }
break;
}
More information about the svn-commits
mailing list