diff --git a/rehlds/common/TextConsoleWin32.cpp b/rehlds/common/TextConsoleWin32.cpp index 6bcdfc5..89539f8 100644 --- a/rehlds/common/TextConsoleWin32.cpp +++ b/rehlds/common/TextConsoleWin32.cpp @@ -217,7 +217,7 @@ int CTextConsoleWin32::GetWidth() void CTextConsoleWin32::SetStatusLine(char *pszStatus) { strncpy(statusline, pszStatus, sizeof(statusline) - 1); - statusline[sizeof statusline - 2] = '\0'; + statusline[sizeof(statusline) - 2] = '\0'; UpdateStatus(); } diff --git a/rehlds/dedicated/src/sys_ded.cpp b/rehlds/dedicated/src/sys_ded.cpp index 8b8dc2f..caa2463 100644 --- a/rehlds/dedicated/src/sys_ded.cpp +++ b/rehlds/dedicated/src/sys_ded.cpp @@ -56,7 +56,7 @@ void ProcessConsoleInput() if (inputLine) { char szBuf[256]; - _snprintf(szBuf, sizeof szBuf, "%s\n", inputLine); + _snprintf(szBuf, sizeof(szBuf), "%s\n", inputLine); engineAPI->AddConsoleText(szBuf); } } @@ -72,6 +72,8 @@ int RunEngine() if (g_bVGui) { // TODO: finish VGUI + //vgui::ivgui()->SetSleep(0); + } #endif CreateInterfaceFn engineFactory = Sys_GetFactory(g_pEngineModule); @@ -137,7 +139,6 @@ int RunEngine() Sys_PrepareConsoleInput(); - if (g_bAppHasBeenTerminated) break; diff --git a/rehlds/dedicated/src/sys_linux.cpp b/rehlds/dedicated/src/sys_linux.cpp index 8def318..07e1660 100644 --- a/rehlds/dedicated/src/sys_linux.cpp +++ b/rehlds/dedicated/src/sys_linux.cpp @@ -185,7 +185,7 @@ long CSys::LoadLibrary(char *lib) char cwd[1024]; char absolute_lib[1024]; - if (!getcwd(cwd, sizeof cwd)) + if (!getcwd(cwd, sizeof(cwd))) ErrorMessage(1, "Sys_LoadLibrary: Couldn't determine current directory."); if (cwd[strlen(cwd) - 1] == '/') @@ -285,7 +285,7 @@ void Sys_PrepareConsoleInput() int main(int argc, char *argv[]) { - _snprintf(g_szEXEName, sizeof g_szEXEName, "%s", argv[0]); + _snprintf(g_szEXEName, sizeof(g_szEXEName), "%s", argv[0]); char* cmdline = BuildCmdLine(argc, argv); StartServer(cmdline);