Browse Source

[cpp] Correct Itt64 divide by zero variable

Hugh 9 years ago
parent
commit
8e2a65c8ec
1 changed files with 2 additions and 2 deletions
  1. 2 2
      std/cpp/_std/haxe/Int64.hx

+ 2 - 2
std/cpp/_std/haxe/Int64.hx

@@ -326,7 +326,7 @@ abstract Int64( __Int64 ) from __Int64 to __Int64
 		Returns the quotient of `a` divided by `b`.
 	**/
 	@:op(A / B) public static #if !cppia inline #end function div( a : Int64, b : Int64 ) : Int64 {
-		if (__Int64.isZero(a))
+		if (__Int64.isZero(b))
 			throw "divide by zero";
 		return __Int64.div(a,b);
 	}
@@ -343,7 +343,7 @@ abstract Int64( __Int64 ) from __Int64 to __Int64
 	**/
 	@:op(A % B) public static #if !cppia inline #end function mod( a : Int64, b : Int64 ) : Int64
    {
-		if (__Int64.isZero(a))
+		if (__Int64.isZero(b))
 			throw "divide by zero";
 		return __Int64.mod(a, b);
    }