aboutsummaryrefslogtreecommitdiff
path: root/core/container/queue/queue.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/container/queue/queue.odin')
-rw-r--r--core/container/queue/queue.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/container/queue/queue.odin b/core/container/queue/queue.odin
index af44ef671..5783cbc6c 100644
--- a/core/container/queue/queue.odin
+++ b/core/container/queue/queue.odin
@@ -56,7 +56,7 @@ space :: proc(q: $Q/Queue($T)) -> int {
// Reserve enough space for at least the specified capacity
reserve :: proc(q: ^$Q/Queue($T), capacity: int) -> runtime.Allocator_Error {
- if uint(capacity) > q.len {
+ if capacity > space(q^) {
return _grow(q, uint(capacity))
}
return nil