From 7e9a8d6aecbf9bbe55640637cd9e424cefe0ac1d Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Tue, 1 Mar 2016 16:32:13 +0100 Subject: [PATCH] Fix linux build --- ihltvdemorecorder.h | 3 ++- natives.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ihltvdemorecorder.h b/ihltvdemorecorder.h index dc9c993..e0be508 100644 --- a/ihltvdemorecorder.h +++ b/ihltvdemorecorder.h @@ -5,6 +5,7 @@ class CDemoFile; class bf_read; class ServerClass; +class CGameInfo; class IDemoRecorder { @@ -36,4 +37,4 @@ public: virtual void ResetDemoInterpolation(void) = 0; }; -#endif \ No newline at end of file +#endif diff --git a/natives.cpp b/natives.cpp index 1997981..98abb79 100644 --- a/natives.cpp +++ b/natives.cpp @@ -231,6 +231,8 @@ static cell_t Native_BroadcastConsoleMessage(IPluginContext *pContext, const cel buffer[len++] = '\n'; buffer[len] = '\0'; + static char fmt[] = "%s"; + if (pBroadcastPrintf) { unsigned char vstk[sizeof(void *) + sizeof(char *) * 2]; @@ -238,7 +240,7 @@ static cell_t Native_BroadcastConsoleMessage(IPluginContext *pContext, const cel *(void **)vptr = (void *)hltvserver->GetBaseServer(); vptr += sizeof(void *); - *(char **)vptr = "%s"; + *(char **)vptr = fmt; vptr += sizeof(char *); *(char **)vptr = buffer;