diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/pointer/exec.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkg/pointer/exec.go b/pkg/pointer/exec.go index 8bb9dba..55020fa 100644 --- a/pkg/pointer/exec.go +++ b/pkg/pointer/exec.go @@ -177,9 +177,17 @@ func (p *Pointer) eval(c int, f *field.Field) (done bool, returnValue *int) { case ',': p.CharacterOutput(p.ss.head.Pop()) case '&': - p.ss.head.Push(p.DecimalInput()) + if v, err := p.DecimalInput(); err != nil { + p.Reverse() + } else { + p.ss.head.Push(v) + } case '~': - p.ss.head.Push(p.CharacterInput()) + if v, err := p.CharacterInput(); err != nil { + p.Reverse() + } else { + p.ss.head.Push(v) + } case 'y': n := p.ss.head.Pop() now := time.Now() |