aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/library.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 57b204e1..82ea327d 100644
--- a/src/library.js
+++ b/src/library.js
@@ -349,6 +349,7 @@ LibraryManager.library = {
typeof window.prompt == 'function') {
// Browser.
result = window.prompt('Input: ');
+ if (result === null) result = '\x00'; // cancel ==> EOF
} else if (typeof readline == 'function') {
// Command line.
result = readline();