Skip to content

Commit

Permalink
Win32: changed long to INT_PTR
Browse files Browse the repository at this point in the history
Needed for proper 64-bit support
  • Loading branch information
DankRank committed Jun 22, 2017
1 parent fe9ccec commit 4470b67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scan-windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ LRESULT CALLBACK handle_kbh(int nCode, WPARAM wParam, LPARAM lParam)
void open_console()
{
int hConHandle;
long lStdHandle;
INT_PTR lStdHandle;
CONSOLE_SCREEN_BUFFER_INFO coninfo;

FILE *fp;
Expand All @@ -66,7 +66,7 @@ void open_console()
coninfo.dwSize.Y = 500;
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);

lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
lStdHandle = (INT_PTR)GetStdHandle(STD_OUTPUT_HANDLE);
hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);

fp = _fdopen( hConHandle, "w" );
Expand Down

0 comments on commit 4470b67

Please sign in to comment.