aboutsummaryrefslogtreecommitdiff
path: root/src/standalone_bun.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/standalone_bun.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/standalone_bun.zig b/src/standalone_bun.zig
index 85a689ded..e7363fb58 100644
--- a/src/standalone_bun.zig
+++ b/src/standalone_bun.zig
@@ -468,7 +468,7 @@ pub const StandaloneModuleGraph = struct {
// at the very least
// if you have not a ton of code, we only do a single read() call
if (Environment.allow_assert or offsets.byte_count > 1024 * 3) {
- const offset_from_end = trailer_bytes.len - (@ptrToInt(end) - @ptrToInt(@as([]u8, &trailer_bytes).ptr));
+ const offset_from_end = trailer_bytes.len - (@intFromPtr(end) - @intFromPtr(@as([]u8, &trailer_bytes).ptr));
std.os.lseek_END(self_exe, -@intCast(i64, offset_from_end + offsets.byte_count)) catch return null;
if (comptime Environment.allow_assert) {
@@ -497,7 +497,7 @@ pub const StandaloneModuleGraph = struct {
if (offsets.byte_count <= 1024 * 3) {
// we already have the bytes
end -= offsets.byte_count;
- @memcpy(to_read.ptr, end, offsets.byte_count);
+ @memcpy(to_read[0..offsets.byte_count], end[0..offsets.byte_count]);
if (comptime Environment.allow_assert) {
std.debug.assert(bun.strings.eqlLong(to_read, end[0..offsets.byte_count], true));
}