diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2024-05-02 21:34:53 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2024-05-02 21:34:53 +0100 |
commit | 22ccb0c370cf2690f1b1a80fe003e05c6ba5e5ed (patch) | |
tree | c85d3a1ea0600e0f9ec78767cff963727662361a /main/command.go | |
parent | f9a69d3121248a6fc285dbcb63b242b8425283ef (diff) | |
download | stred-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.go | 6 |
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() |