summaryrefslogtreecommitdiff
path: root/vtab.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vtab.zig4
1 files changed, 2 insertions, 2 deletions
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 {
35fn dupeToSQLiteString(s: []const u8) [*c]const u8 { 35fn dupeToSQLiteString(s: []const u8) [*c]const u8 {
36 var buffer: [*c]u8 = @ptrCast(c.sqlite3_malloc(@intCast(s.len + 1))); 36 var buffer: [*c]u8 = @ptrCast(c.sqlite3_malloc(@intCast(s.len + 1)));
37 37
38 mem.copy(u8, buffer[0..s.len], s); 38 mem.copyForwards(u8, buffer[0..s.len], s);
39 buffer[s.len] = 0; 39 buffer[s.len] = 0;
40 40
41 return buffer; 41 return buffer;
@@ -253,7 +253,7 @@ pub const BestIndexBuilder = struct {
253 // Must always be NULL-terminated so add 1 253 // Must always be NULL-terminated so add 1
254 const tmp: [*c]u8 = @ptrCast(c.sqlite3_malloc(@intCast(self.id.str.len + 1))); 254 const tmp: [*c]u8 = @ptrCast(c.sqlite3_malloc(@intCast(self.id.str.len + 1)));
255 255
256 mem.copy(u8, tmp[0..self.id.str.len], self.id.str); 256 mem.copyForwards(u8, tmp[0..self.id.str.len], self.id.str);
257 tmp[self.id.str.len] = 0; 257 tmp[self.id.str.len] = 0;
258 258
259 index_info.idxStr = tmp; 259 index_info.idxStr = tmp;