Skip to content

Commit

Permalink
Fix bug in krk_long_medium for negative widths
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Feb 29, 2024
1 parent 191515b commit 21f0828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/obj_long.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ static int64_t krk_long_medium(KrkLong * num) {

if (num->width < 0) {
uint64_t val = num->digits[0];
if (num->width < 1) {
if (num->width < -1) {
val |= (num->digits[1]) << 31;
}
return -val;
Expand Down

0 comments on commit 21f0828

Please sign in to comment.