mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
fix fuzz crash ty_anno_unexpected_token, handle EOF more gracefully
This commit is contained in:
parent
f6ae028c6e
commit
35cd1e8dd9
7 changed files with 65 additions and 22 deletions
|
@ -119,9 +119,9 @@ fn generateObjectFile(
|
|||
|
||||
const suffix =
|
||||
if (target.result.os.tag == std.Target.Os.Tag.windows)
|
||||
"obj"
|
||||
else
|
||||
"o";
|
||||
"obj"
|
||||
else
|
||||
"o";
|
||||
const install = b.addInstallFile(obj_file, b.fmt("{s}.{s}", .{ object_name, suffix }));
|
||||
|
||||
const obj_step = b.step(step_name, "Build object file for linking");
|
||||
|
|
|
@ -517,9 +517,9 @@ pub fn listSwap(
|
|||
const source_ptr = @as([*]u8, @ptrCast(newList.bytes));
|
||||
|
||||
swapElements(source_ptr, element_width, @as(usize,
|
||||
// We already verified that both indices are less than the stored list length,
|
||||
// which is usize, so casting them to usize will definitely be lossless.
|
||||
@intCast(index_1)), @as(usize, @intCast(index_2)), copy);
|
||||
// We already verified that both indices are less than the stored list length,
|
||||
// which is usize, so casting them to usize will definitely be lossless.
|
||||
@intCast(index_1)), @as(usize, @intCast(index_2)), copy);
|
||||
|
||||
return newList;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue