aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2010-11-20 18:38:44 -0800
committerAlon Zakai <azakai@mozilla.com>2010-11-20 18:38:44 -0800
commitd61473b75862c62293318ced24a638d322ff2bd9 (patch)
treeffc9a68267a5543a280568f8842bc2f4eb696c67 /src/preamble.js
parent6c91ad62cdc7026bfe89539770da2c1200359d35 (diff)
misc minor fixes and additions
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js
index a39fc515..1623d387 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -337,6 +337,12 @@ function _strlen(ptr) {
PRINTBUFFER = '';
function __print__(text) {
+ if (text === null) {
+ // Flush
+ print(PRINTBUFFER);
+ PRINTBUFFER = '';
+ return;
+ }
// We print only when we see a '\n', as console JS engines always add
// one anyhow.
PRINTBUFFER = PRINTBUFFER + text;