瀏覽代碼

[cpp] Correct Itt64 divide by zero variable

Hugh 9 年之前
父節點
當前提交
8e2a65c8ec
共有 1 個文件被更改,包括 2 次插入2 次删除
  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);
    }