File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1921,7 +1921,7 @@ impl<'a> Interpreter<'a> {
19211921 return Err ( make_err ( ErrorKind :: Io ( e) , pc) ) ;
19221922 }
19231923 } else {
1924- return Err ( make_err ( ErrorKind :: StackIsEmpty , pc ) ) ;
1924+ // do nothing
19251925 }
19261926
19271927 pc += 1 ;
@@ -1934,13 +1934,15 @@ impl<'a> Interpreter<'a> {
19341934 ) ) ;
19351935 }
19361936
1937+ let o = self . output . as_mut ( ) . unwrap ( ) ;
19371938 if let Some ( a) = self . stack . pop ( ) {
1938- let o = self . output . as_mut ( ) . unwrap ( ) ;
19391939 if let Err ( e) = writeln ! ( o, "{a}" ) {
19401940 return Err ( make_err ( ErrorKind :: Io ( e) , pc) ) ;
19411941 }
19421942 } else {
1943- return Err ( make_err ( ErrorKind :: StackIsEmpty , pc) ) ;
1943+ if let Err ( e) = writeln ! ( o) {
1944+ return Err ( make_err ( ErrorKind :: Io ( e) , pc) ) ;
1945+ }
19441946 }
19451947
19461948 pc += 1 ;
You can’t perform that action at this time.
0 commit comments