aboutsummaryrefslogtreecommitdiff
path: root/src/stackStack.zig
diff options
context:
space:
mode:
authorJulien Dessaux2023-12-18 07:26:01 +0100
committerJulien Dessaux2023-12-18 15:16:51 +0100
commit83af8ab1249b98bb5cf691b88bfc947d1d688710 (patch)
treeaa6833315a336959fbca035b82106ce81d5e5add /src/stackStack.zig
parentUpdated README for last zig version (diff)
downloadzigfunge98-83af8ab1249b98bb5cf691b88bfc947d1d688710.tar.gz
zigfunge98-83af8ab1249b98bb5cf691b88bfc947d1d688710.tar.bz2
zigfunge98-83af8ab1249b98bb5cf691b88bfc947d1d688710.zip
zig 0.11 changes
Diffstat (limited to 'src/stackStack.zig')
-rw-r--r--src/stackStack.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/stackStack.zig b/src/stackStack.zig
index a76d304..d846429 100644
--- a/src/stackStack.zig
+++ b/src/stackStack.zig
@@ -28,7 +28,7 @@ pub const StackStack = struct {
const n = soss.pop();
self.toss = try stack.Stack.init(self.allocator);
if (n > 0) {
- try self.toss.transfert(soss, @intCast(u64, n));
+ try self.toss.transfert(soss, @intCast(n));
} else if (n < 0) {
var i: usize = 0;
while (i < -n) : (i += 1) {
@@ -85,9 +85,11 @@ pub const StackStack = struct {
const n = self.toss.pop();
const v = soss.popVector();
if (n > 0) {
- try soss.transfert(self.toss, @intCast(u64, n));
+ const nn: usize = @intCast(n);
+ try soss.transfert(self.toss, nn);
} else {
- soss.discard(@intCast(u64, -n));
+ const nn: usize = @intCast(-n);
+ soss.discard(nn);
}
self.toss.deinit();
self.toss = soss;