We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 064acc9 commit 5fb125eCopy full SHA for 5fb125e
src/rtlib/unix/hinit.c
@@ -182,17 +182,16 @@ void fb_hRecheckConsoleSize( int requery_cursorpos )
182
/* Try to query the terminal size */
183
/* Try TIOCGWINSZ */
184
struct winsize win = { 0, 0, 0, 0 };
185
- ioctl( STDOUT_FILENO, TIOCGWINSZ, &win );
+ if( ioctl( STDOUT_FILENO, TIOCGWINSZ, &win ) != 0 ) {
186
#ifdef HOST_LINUX
187
- if( win.ws_row == 0 || win.ws_col == 0 ) {
188
/* Try an escape sequence */
189
int r, c;
190
if( fb_hTermQuery( SEQ_QUERY_WINDOW, &r, &c ) ) {
191
win.ws_row = r;
192
win.ws_col = c;
193
}
194
- }
195
#endif
+ }
196
197
/* Fallback to defaults if all above queries failed */
198
/* Besides probably being correct, this also means we don't have to
0 commit comments