OSDN Git Service

Shell console: fix bug in shell output stream
authorRoman Birg <roman@cyngn.com>
Tue, 23 Jun 2015 14:06:33 +0000 (07:06 -0700)
committerRoman Birg <roman@cyngn.com>
Tue, 23 Jun 2015 14:06:33 +0000 (07:06 -0700)
The command is finished and the partial result may also have the command
exit code. When the partial stream does have the exit code, we were
writing *only* the contents of the exit code, but we need to write
everything *until* the exit code, keeping the contents intact.

Change-Id: I5e7af1125270c394f42fe7661cbefdd98c6a6052
Signed-off-by: Roman Birg <roman@cyngn.com>
src/com/cyanogenmod/filemanager/console/shell/ShellConsole.java

index 00a65be..1ecdc82 100644 (file)
@@ -1236,7 +1236,7 @@ public abstract class ShellConsole extends Console implements Program.ProgramLis
 
             if (match != null) {
                 partial.reset();
-                partial.write(bytes, match[0], match[1]);
+                partial.write(bytes, 0, match[0]);
             }
         }
         return ret;