aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2021-10-06 18:35:00 +0200
committerJulien Dessaux2021-10-06 18:35:00 +0200
commitdbba21a74b2afa7d8bea7c1f5cbb75c6a15a8f1b (patch)
treefe852ee98320b96b570833a66070fa833d7fb327
parentSimplified some code (diff)
downloadgofunge98-dbba21a74b2afa7d8bea7c1f5cbb75c6a15a8f1b.tar.gz
gofunge98-dbba21a74b2afa7d8bea7c1f5cbb75c6a15a8f1b.tar.bz2
gofunge98-dbba21a74b2afa7d8bea7c1f5cbb75c6a15a8f1b.zip
Fixed edge case in the k command
-rw-r--r--pkg/pointer/exec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/pointer/exec.go b/pkg/pointer/exec.go
index 9859360..aae7a81 100644
--- a/pkg/pointer/exec.go
+++ b/pkg/pointer/exec.go
@@ -75,6 +75,9 @@ func (p *Pointer) eval(c int, f *field.Field) (done bool, returnValue *int) {
if n > 0 {
p.x, p.y = x, y
if c != ' ' && c != ';' {
+ if c == 'q' || c == '@' {
+ return p.eval(c, f)
+ }
for i := 0; i < n; i++ {
p.eval(c, f)
}