mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
fix isize/usize mixup
This commit is contained in:
parent
0f7500e4fe
commit
dbb1484a91
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ pub const RocStr = extern struct {
|
|||
if (in_place == InPlace.InPlace) {
|
||||
new_bytes[0] = @intCast(usize, number_of_chars);
|
||||
} else {
|
||||
new_bytes[0] = std.math.minInt(usize);
|
||||
const v: isize = std.math.minInt(isize);
|
||||
new_bytes[0] = @bitCast(usize, v);
|
||||
}
|
||||
|
||||
var first_element = @ptrCast([*]align(@alignOf(usize)) u8, new_bytes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue