diff --git a/src/conio/win32cio.c b/src/conio/win32cio.c
index cff1bbcb7cbf83da33396745d7311b0bc6411052..714aff314b88ee9219875c01b61828d0f73bd442 100644
--- a/src/conio/win32cio.c
+++ b/src/conio/win32cio.c
@@ -343,7 +343,7 @@ int win32_initciolib(long inmode)
 	if(!SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), conmode))
 		return(0);
 
-	if(GetConsoleScreenBufferInfo(GetStdHandle(STD_INPUT_HANDLE), &sbuff)==0) {
+	if(GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &sbuff)==0) {
 		win32_textmode(C80);
 	}
 	else {