diff options
Diffstat (limited to 'std/stack.zc')
| -rw-r--r-- | std/stack.zc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/stack.zc b/std/stack.zc index 7df77f1..db02f2d 100644 --- a/std/stack.zc +++ b/std/stack.zc @@ -25,7 +25,7 @@ impl Stack<T> { new_stack.len = self.len; new_stack.cap = self.cap; new_stack.data = malloc(sizeof(T) * new_stack.cap); - memcpy(new_stack.data, self.data, sizeof(T) * new_stack.cap); + memcpy(new_stack.data, self.data, sizeof(T) * new_stack.len); return new_stack; } |
