[asterisk-commits] tilghman: branch 1.6.2 r241769 - in /branches/1.6.2: ./ funcs/func_math.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 20 23:56:11 CST 2010


Author: tilghman
Date: Wed Jan 20 23:56:09 2010
New Revision: 241769

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=241769
Log:
Merged revisions 241766 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r241766 | tilghman | 2010-01-20 23:54:30 -0600 (Wed, 20 Jan 2010) | 9 lines
  
  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:
    branches/1.6.2/   (props changed)
    branches/1.6.2/funcs/func_math.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/funcs/func_math.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/funcs/func_math.c?view=diff&rev=241769&r1=241768&r2=241769
==============================================================================
--- branches/1.6.2/funcs/func_math.c (original)
+++ branches/1.6.2/funcs/func_math.c Wed Jan 20 23:56:09 2010
@@ -253,7 +253,11 @@
 			int inum1 = fnum1;
 			int inum2 = fnum2;
 
-			ftmp = (inum1 % inum2);
+			if (inum2 == 0) {
+				ftmp = 0;
+			} else {
+				ftmp = (inum1 % inum2);
+			}
 
 			break;
 		}




More information about the asterisk-commits mailing list