OSDN Git Service

Replace \0s with spaces before sending strings to curses.
authorBernhard Kauer <kauer@os.inf.tu-dresden.de>
Fri, 21 May 2010 12:05:55 +0000 (14:05 +0200)
committerAndrzej Zaborowski <balrog@zabor.org>
Fri, 21 May 2010 12:05:55 +0000 (14:05 +0200)
Signed-off-by: Bernhard Kauer <kauer@tudos.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
console.h

index 6def115..3a75bcc 100644 (file)
--- a/console.h
+++ b/console.h
@@ -306,6 +306,8 @@ static inline int ds_get_bytes_per_pixel(DisplayState *ds)
 typedef unsigned long console_ch_t;
 static inline void console_write_ch(console_ch_t *dest, uint32_t ch)
 {
+    if (!(ch & 0xff))
+        ch |= ' ';
     cpu_to_le32wu((uint32_t *) dest, ch);
 }