minuitwrp: fix crash issue, when the console use TTF font to display unicode font.

gui: fix terminal command unusual line breaks and missing characters at the end of a read buf.

Change-Id: I8d3d740b6066b1594c5148b2012f0e7bcbecc22b
This commit is contained in:
xiaolu
2015-02-22 20:49:35 +08:00
committed by Dees Troy
parent 5aa29ab3c7
commit e738da5e89
2 changed files with 34 additions and 22 deletions
+1 -2
View File
@@ -1360,8 +1360,7 @@ int GUIAction::terminalcommand(std::string arg)
} else {
// Try to read output
memset(line, 0, sizeof(line));
bytes_read = read(fd, line, sizeof(line));
if (bytes_read > 0)
if(fgets(line, sizeof(line), fp) != NULL)
gui_print("%s", line); // Display output
else
keep_going = 0; // Done executing