From a5f3c1b84960ef3f0175d319acdb958769862397 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Mon, 20 Jan 2025 19:51:46 +0100 Subject: container/queue: fix init_with_contents Fixes #4729 --- core/container/queue/queue.odin | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/container/queue/queue.odin') diff --git a/core/container/queue/queue.odin b/core/container/queue/queue.odin index f83a5f2b7..d1040a7c9 100644 --- a/core/container/queue/queue.odin +++ b/core/container/queue/queue.odin @@ -46,8 +46,7 @@ init_with_contents :: proc(q: ^$Q/Queue($T), backing: []T) -> bool { cap = builtin.len(backing), allocator = {procedure=runtime.nil_allocator_proc, data=nil}, } - q.len = len(backing) - q.offset = len(backing) + q.len = builtin.len(backing) return true } -- cgit v1.2.3