diff --git a/Shell/LineEditor.cpp b/Shell/LineEditor.cpp index bc260a52ddbda5..0984a93900f259 100644 --- a/Shell/LineEditor.cpp +++ b/Shell/LineEditor.cpp @@ -34,9 +34,10 @@ LineEditor::LineEditor() { struct winsize ws; - int rc = ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws); - ASSERT(rc == 0); - m_num_columns = ws.ws_col; + if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) < 0) + m_num_columns = 80; + else + m_num_columns = ws.ws_col; } LineEditor::~LineEditor()