Revision
1195
Author
lsansonetti@apple.com
Date
2009-03-26 18:29:08 -0700 (Thu, 26 Mar 2009)

Log Message

route divisions by zero through the dispatcher (note: currently only handles the immediate/immediate case)

Modified Paths

Diff

Modified: MacRuby/branches/experimental/roxor.cpp (1194 => 1195)


--- MacRuby/branches/experimental/roxor.cpp	2009-03-27 01:19:25 UTC (rev 1194)
+++ MacRuby/branches/experimental/roxor.cpp	2009-03-27 01:29:08 UTC (rev 1195)
@@ -1419,6 +1419,9 @@
 		res = leftLong - rightLong;
 	    }
 	    else if (sel == selDIV) {
+		if (rightLong == 0) {
+		    return NULL;
+		}
 		res = leftLong / rightLong;
 	    }
 	    else if (sel == selMULT) {