From 1a25af5e3dde2389c747e18d565cedf39c79a43d Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Mon, 20 Mar 2023 05:57:23 -0700 Subject: Implement simple `workspaces` glob support in bun install (#2435) * [bun install] Implement `packages/*`-style globs * Fix incorrect assertion * :nail_care: * remove extraneous console.log * Fix pointer to stack memory * Add a test with a scoped package name from a glob workspace * Fixup --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/string_immutable.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/string_immutable.zig') diff --git a/src/string_immutable.zig b/src/string_immutable.zig index d393577fc..321abb9f7 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -3192,7 +3192,7 @@ pub fn indexOfCharZ(sliceZ: [:0]const u8, char: u8) ?u63 { const pos = @ptrToInt(ptr) - @ptrToInt(sliceZ.ptr); if (comptime Environment.allow_assert) - std.debug.assert(@ptrToInt(sliceZ.ptr) >= @ptrToInt(ptr) and + std.debug.assert(@ptrToInt(sliceZ.ptr) <= @ptrToInt(ptr) and @ptrToInt(ptr) < @ptrToInt(sliceZ.ptr + sliceZ.len) and pos <= sliceZ.len); -- cgit v1.2.3