terminal_log: don't write null-termination to terminal

Fixes #1231.
This commit is contained in:
Christian Prochaska 2014-08-19 16:58:38 +02:00 committed by Norman Feske
parent 61b370ecba
commit a34ab1b978

View File

@ -74,9 +74,7 @@ namespace Genode {
*/
enum { ESC = 27 };
if ((string[0] == ESC) && (len == 5) && (string[4] == '\n')) {
char buf[5];
strncpy(buf, string, 5);
_terminal->write(buf, len);
_terminal->write(string, len - 1);
return len;
}