mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-04 11:24:37 -04:00
Fix issue #280
This commit is contained in:
1 parent
b55b1ffe14
commit
d035d48c8e
1 file changed
+4
-4
@@ -439,19 +439,19 @@ is_integer_negative :: proc(u: u64, is_signed: bool, bit_size: int) -> (unsigned
|
||||
case 8:
|
||||
i := i8(u);
|
||||
neg = i < 0;
|
||||
u = u64(abs(i));
|
||||
u = u64(abs(i64(i)));
|
||||
case 16:
|
||||
i := i16(u);
|
||||
neg = i < 0;
|
||||
u = u64(abs(i));
|
||||
u = u64(abs(i64(i)));
|
||||
case 32:
|
||||
i := i32(u);
|
||||
neg = i < 0;
|
||||
u = u64(abs(i));
|
||||
u = u64(abs(i64(i)));
|
||||
case 64:
|
||||
i := i64(u);
|
||||
neg = i < 0;
|
||||
u = u64(abs(i));
|
||||
u = u64(abs(i64(i)));
|
||||
case:
|
||||
panic("is_integer_negative: Unknown integer size");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user