mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-10-28 07:27:09 +01:00
Fixed excpetion throwing in INI document to that generated corrupted messages because snprintf was used instead of vsnprintf.
Revised most of the INI plugin and cleaned code.
This commit is contained in:
1 parent
27fb281805
commit
a947a68256
9 files changed
+180
-96
No files matched your search
@@ -57,7 +57,7 @@ CSStr FmtStr(CSStr str, ...)
|
||||
// Write the requested contents
|
||||
if (std::vsnprintf(g_Buffer, sizeof(g_Buffer), str, args) < 0)
|
||||
{
|
||||
g_Buffer[0] = 0; // make sure the string is terminated
|
||||
g_Buffer[0] = 0; // Make sure the string is terminated
|
||||
}
|
||||
// Release the argument list
|
||||
va_end(args);
|
||||
|
||||
@@ -619,7 +619,7 @@ SQMOD_API_EXPORT unsigned int VcmpPluginInit(PluginFuncs* functions, PluginCallb
|
||||
_Info = info;
|
||||
// Assign plugin information
|
||||
_Info->uPluginVer = SQIRC_VERSION;
|
||||
strcpy(_Info->szName, SQIRC_HOST_NAME);
|
||||
std::strcpy(_Info->szName, SQIRC_HOST_NAME);
|
||||
// Bind callbacks
|
||||
BindCallbacks();
|
||||
// Notify that the plugin was successfully loaded
|
||||
|
||||
Reference in new issue
Block a user