mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
Fix logic
This commit is contained in:
parent
0ab4afbf42
commit
eeda1a1396
@ -1685,16 +1685,11 @@ void bigint_incr(BigInt *x) {
|
||||
}
|
||||
|
||||
if (x->digit_count == 1) {
|
||||
if (x->is_negative) {
|
||||
if (x->data.digit != 0) {
|
||||
x->data.digit -= 1;
|
||||
}
|
||||
if (x->is_negative && x->data.digit != 0) {
|
||||
x->data.digit -= 1;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (x->data.digit != UINT64_MAX) {
|
||||
x->data.digit += 1;
|
||||
}
|
||||
} else if (!x->is_negative && x->data.digit != UINT64_MAX) {
|
||||
x->data.digit += 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user