[asterisk-commits] tilghman: branch 1.6.1 r241768 - in /branches/1.6.1: ./ funcs/func_math.c

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


Author: tilghman
Date: Wed Jan 20 23:56:01 2010
New Revision: 241768

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=241768
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.1/   (props changed)
    branches/1.6.1/funcs/func_math.c

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

Modified: branches/1.6.1/funcs/func_math.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/funcs/func_math.c?view=diff&rev=241768&r1=241767&r2=241768
==============================================================================
--- branches/1.6.1/funcs/func_math.c (original)
+++ branches/1.6.1/funcs/func_math.c Wed Jan 20 23:56:01 2010
@@ -224,7 +224,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