aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-16 13:34:57 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-16 13:34:57 -0700
commita9944696a7d16fe0acca00c901821cb01e0aaa1c (patch)
treefea4f2f4526e75c29231f60a1093e5052765290f
parent845bfb676524358a70e0dee0e502f4df6725fce1 (diff)
fix invalid character
-rw-r--r--src/library.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js
index ea44f259..2472e701 100644
--- a/src/library.js
+++ b/src/library.js
@@ -349,7 +349,7 @@ LibraryManager.library = {
typeof window.prompt == 'function') {
// Browser.
result = window.prompt('Input: ');
- if (result === null) result = '\x00'; // cancel ==> EOF
+ if (result === null) result = String.fromCharCode(0); // cancel ==> EOF
} else if (typeof readline == 'function') {
// Command line.
result = readline();