Fix the support for 0x0 sized terminals (adb shell)