Browse Source

Fixed bitwise operator issue on large integers.

woollybah 10 năm trước cách đây
mục cha
commit
549ca26738
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 4 0
      ctranslator.bmx
  2. 1 1
      options.bmx

+ 4 - 0
ctranslator.bmx

@@ -1552,6 +1552,10 @@ EndRem
 		If expr.op = "^" Then
 			Return "pow" + Bra(t_lhs + ", " + t_rhs)
 		End If
+		
+		If (expr.op = "shr" Or expr.op = "&" Or expr.op = "|") And TIntType(expr.exprType) Then
+			t_lhs = "(unsigned int)(" + t_lhs + ")"
+		End If
 
 		If TBinaryCompareExpr(expr) Then
 			If TStringType(TBinaryCompareExpr(expr).ty) Then

+ 1 - 1
options.bmx

@@ -25,7 +25,7 @@ SuperStrict
 
 Import "base.configmap.bmx"
 
-Const version:String = "0.31"
+Const version:String = "0.32"
 
 Const BUILDTYPE_APP:Int = 0
 Const BUILDTYPE_MODULE:Int = 1