<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main/command.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2024-05-02 21:34:53 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2024-05-02 21:34:53 +0100
commit22ccb0c370cf2690f1b1a80fe003e05c6ba5e5ed (patch)
treec85d3a1ea0600e0f9ec78767cff963727662361a /main/command.go
parentf9a69d3121248a6fc285dbcb63b242b8425283ef (diff)
downloadstred-go-22ccb0c370cf2690f1b1a80fe003e05c6ba5e5ed.tar
Fix FullMerge command so it can work on non-structure values
Diffstat (limited to 'main/command.go')
-rw-r--r--main/command.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/command.go b/main/command.go
index e795333..bbbb036 100644
--- a/main/command.go
+++ b/main/command.go
@@ -143,10 +143,14 @@ type FullMergeCommand struct {
}
func (cmd FullMergeCommand) exec(state *ProgramState) {
_, notOk := runSubex(cmd.subex, state.value)
- if notOk || state.end {
+ if notOk {
state.pc++
return
}
+ if !state.start {
+ state.pc += 2
+ return
+ }
for {
item, err := state.Read()