diff --git a/core/sourcemod.cpp b/core/sourcemod.cpp index 51ba5a5a..e77c8f5f 100644 --- a/core/sourcemod.cpp +++ b/core/sourcemod.cpp @@ -479,7 +479,7 @@ void SourceModBase::DoGlobalPluginLoads() g_PluginSys.AllPluginsLoaded(); } -size_t SourceModBase::BuildPath(PathType type, char *buffer, size_t maxlength, char *format, ...) +size_t SourceModBase::BuildPath(PathType type, char *buffer, size_t maxlength, const char *format, ...) { char _buffer[PLATFORM_MAX_PATH]; va_list ap; diff --git a/core/sourcemod.h b/core/sourcemod.h index 53a4e01b..e677dae2 100644 --- a/core/sourcemod.h +++ b/core/sourcemod.h @@ -103,7 +103,7 @@ public: // SMGlobalClass public: // ISourceMod const char *GetGamePath() const; const char *GetSourceModPath() const; - size_t BuildPath(PathType type, char *buffer, size_t maxlength, char *format, ...); + size_t BuildPath(PathType type, char *buffer, size_t maxlength, const char *format, ...); void LogMessage(IExtension *pExt, const char *format, ...); void LogError(IExtension *pExt, const char *format, ...); size_t FormatString(char *buffer, size_t maxlength, IPluginContext *pContext, const cell_t *params, unsigned int param); diff --git a/public/ISourceMod.h b/public/ISourceMod.h index 38cabf0c..bf1d4666 100644 --- a/public/ISourceMod.h +++ b/public/ISourceMod.h @@ -101,7 +101,7 @@ namespace SourceMod * @param ... Format arguments. * @return Number of bytes written. */ - virtual size_t BuildPath(PathType type, char *buffer, size_t maxlength, char *format, ...) =0; + virtual size_t BuildPath(PathType type, char *buffer, size_t maxlength, const char *format, ...) =0; /** * @brief Logs a message to the SourceMod logs.