Fixed a bug that pointer subtraction results from two absolute addresses are calculated as unsigned long.
This commit is contained in:
@@ -3353,7 +3353,7 @@ static void parsesub (ExprDesc* Expr)
|
||||
Error ("Incompatible pointer types");
|
||||
} else {
|
||||
Expr->IVal = (Expr->IVal - Expr2.IVal) /
|
||||
CheckedPSizeOf (lhst);
|
||||
(long)CheckedPSizeOf (lhst);
|
||||
}
|
||||
/* Operate on pointers, result type is an integer */
|
||||
Expr->Type = type_int;
|
||||
|
||||
Reference in New Issue
Block a user