From 2210afe02b853258c6fe8a5b863217c4ab3f3875 Mon Sep 17 00:00:00 2001 From: Jacob Coby Date: Mon, 29 Apr 2024 14:46:14 -0400 Subject: [PATCH] Revert win long -> int changes --- win32/windebug.cpp | 14 +++++++------- win32/winmono.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/win32/windebug.cpp b/win32/windebug.cpp index ac35b901..cf06b90d 100644 --- a/win32/windebug.cpp +++ b/win32/windebug.cpp @@ -1,5 +1,5 @@ /* -* Descent 3 +* Descent 3 * Copyright (C) 2024 Parallax Software * * This program is free software: you can redistribute it and/or modify @@ -1057,7 +1057,7 @@ static void PrintFileTime(char *sztime, FILETIME ftime) { static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle) { char FmtString[2000]; - unsigned int bytesout; + unsigned long bytesout; char ModName[MAX_PATH]; __try { if (GetModuleFileName(ModuleHandle, ModName, sizeof(ModName)) > 0) { @@ -1102,7 +1102,7 @@ static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle) { static void RecordModuleList(HANDLE LogFile) { char FmtString[2000]; - unsigned int bytesout; + unsigned long bytesout; wsprintf(FmtString, "\r\n" "Modules:\r\n"); WriteFile(LogFile, FmtString, lstrlen(FmtString), &bytesout, 0); @@ -1139,7 +1139,7 @@ static void RecordModuleList(HANDLE LogFile) { static void RecordSystemInformation(HANDLE LogFile) { char FmtString[2000]; - unsigned int bytesout; + unsigned long bytesout; FILETIME CurrentTime; GetSystemTimeAsFileTime(&CurrentTime); char TimeBuffer[100]; @@ -1220,16 +1220,16 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message) { char *p = Debug_DumpInfo(); lstrcpy(callstack, p); - unsigned int NumBytes; + unsigned long NumBytes; SetFilePointer(LogFile, 0, 0, FILE_END); WriteFile(LogFile, topmsg, lstrlen(topmsg), &NumBytes, 0); WriteFile(LogFile, FORMATCRLF, lstrlen(FORMATCRLF), &NumBytes, 0); char Username[100]; - unsigned int unamelen = 99; + unsigned long unamelen = 99; char Machinename[200]; - unsigned int cnamelen = 199; + unsigned long cnamelen = 199; GetUserName(Username, &unamelen); GetComputerName(Machinename, &cnamelen); wsprintf(callstack, "Username: %s\r\nMachineName: %s\r\n", Username, Machinename); diff --git a/win32/winmono.cpp b/win32/winmono.cpp index e799c48f..807e97ee 100644 --- a/win32/winmono.cpp +++ b/win32/winmono.cpp @@ -1,5 +1,5 @@ /* -* Descent 3 +* Descent 3 * Copyright (C) 2024 Parallax Software * * This program is free software: you can redistribute it and/or modify @@ -129,7 +129,7 @@ SOCKADDR_IN tcp_log_addr; char tcp_log_buffer[MAX_TCPLOG_LEN]; void nw_InitTCPLogging(char *ip, unsigned short port) { - unsigned int argp = 1; + unsigned long argp = 1; int addrlen = sizeof(SOCKADDR_IN); tcp_log_sock = socket(AF_INET, SOCK_STREAM, 0); if (INVALID_SOCKET == tcp_log_sock) {