aboutsummaryrefslogtreecommitdiff
path: root/src/stack.nim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stack.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stack.nim b/src/stack.nim
index 9ba3e24..f08baf0 100644
--- a/src/stack.nim
+++ b/src/stack.nim
@@ -5,7 +5,7 @@ type
next: ref Stack
func NewStack*(size: int = 32, next: ref Stack = nil): ref Stack =
- result = new(Stack)
+ new(result)
result.size = size
result.data.setlen(size)
result.next = next