[OpenBIOS] [PATCH 8/10] Check that stdout variable is not null

William Hahne will07c5 at gmail.com
Tue Aug 9 23:55:07 CEST 2011


BootX will sometimes set the stdout variable to null and then subsequently
call io-emit which can eventually result in an infinite loop.

Index: forth/admin/iocontrol.fs
===================================================================
--- forth/admin/iocontrol.fs (revision 1041)
+++ forth/admin/iocontrol.fs (working copy)
@@ -80,6 +80,7 @@
 ;

 : io-emit ( char -- )
+  stdout @ 0= if drop exit then \ make sure stdout pointer is not null
   io-out-char c!
   io-out-char 1 " write" stdout @ $call-method drop
 ;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openbios.org/pipermail/openbios/attachments/20110809/51338c5c/attachment.html>


More information about the OpenBIOS mailing list