From 04546ae979363ed59fb878b0fdd27fdfb86fd039 Mon Sep 17 00:00:00 2001 From: visionmercer <62051836+visionmercer@users.noreply.github.com> Date: Tue, 2 May 2023 11:57:19 +0200 Subject: [PATCH] Update libqb.cpp --- internal/c/libqb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index 4a3a14afd..5431cea9e 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -19077,7 +19077,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){ if (new_error) return 0; #ifdef QB64_WINDOWS - if ((read_page->console && !passed)||i==console_image){ + if ((write_page->console && !passed)||i==console_image){ SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1}; HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0); CONSOLE_SCREEN_BUFFER_INFO cl_bufinfo; @@ -19086,7 +19086,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){ } #endif #ifdef QB64_UNIX - if ((read_page->console && !passed)||i==console_image){ + if ((write_page->console && !passed)||i==console_image){ struct winsize w; ioctl(STDOUT_FILENO, TIOCGWINSZ, &w); return w.ws_col; @@ -19113,7 +19113,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){ if (new_error) return 0; #ifdef QB64_WINDOWS - if ((read_page->console && !passed)||i==console_image){ + if ((write_page->console && !passed)||i==console_image){ SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1}; HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0); CONSOLE_SCREEN_BUFFER_INFO cl_bufinfo; @@ -19123,7 +19123,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){ } #endif #ifdef QB64_UNIX - if ((read_page->console && !passed)||i==console_image){ + if ((write_page->console && !passed)||i==console_image){ struct winsize w; ioctl(STDOUT_FILENO, TIOCGWINSZ, &w); return w.ws_row;