From 3d8e617c43d047b87bcbf74e9b6d26caf9f3f4f0 Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Wed, 6 Dec 2023 22:45:00 +0100 Subject: fix for latest zig --- vtab.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vtab.zig') diff --git a/vtab.zig b/vtab.zig index eb73990..9e0b7f3 100644 --- a/vtab.zig +++ b/vtab.zig @@ -35,7 +35,7 @@ pub const ModuleContext = struct { fn dupeToSQLiteString(s: []const u8) [*c]const u8 { var buffer: [*c]u8 = @ptrCast(c.sqlite3_malloc(@intCast(s.len + 1))); - mem.copy(u8, buffer[0..s.len], s); + mem.copyForwards(u8, buffer[0..s.len], s); buffer[s.len] = 0; return buffer; @@ -253,7 +253,7 @@ pub const BestIndexBuilder = struct { // Must always be NULL-terminated so add 1 const tmp: [*c]u8 = @ptrCast(c.sqlite3_malloc(@intCast(self.id.str.len + 1))); - mem.copy(u8, tmp[0..self.id.str.len], self.id.str); + mem.copyForwards(u8, tmp[0..self.id.str.len], self.id.str); tmp[self.id.str.len] = 0; index_info.idxStr = tmp; -- cgit v1.2.3