crashappsec / libcon4m

Base Compiler and Runtime Support for con4m
Apache License 2.0
0 stars 0 forks source link

assignops: /= behaves incorrectly with negative number #55

Closed ee7 closed 4 months ago

ee7 commented 4 months ago

With:

Example

x = 3
x /= -1
print(x)

Expected behavior

Outputs -3.

Observed behavior

Outputs 0.

viega commented 4 months ago

Yes, accidentally used the wrong type on the LHS when accessing the union; fixed in branch.