diff --git a/src/builtins/io.pir b/src/builtins/io.pir index 5f2e76c725e..983f8b0b931 100644 --- a/src/builtins/io.pir +++ b/src/builtins/io.pir @@ -165,8 +165,12 @@ Shows the supplied message and then waits for input from $*IN. .param string prompt 'print'(prompt) $P0 = get_hll_global "$IN" - $S0 = $P0.'get'() + $P1 = $P0.'get'() + unless $P1 goto undef + $S0 = $P1 .return ($S0) + undef: + .return ($P1) .end