1.1 --- a/core/sourcemod.cpp Mon May 07 04:17:24 2007 +0000
1.2 +++ b/core/sourcemod.cpp Tue May 08 00:21:44 2007 +0000
1.3 @@ -101,7 +101,7 @@
1.4 return ConfigResult_Ignore;
1.5 }
1.6
1.7 -bool SourceModBase::InitializeSourceMod(char *error, size_t err_max, bool late)
1.8 +bool SourceModBase::InitializeSourceMod(char *error, size_t maxlength, bool late)
1.9 {
1.10 const char *gamepath = g_SMAPI->GetBaseDir();
1.11
1.12 @@ -141,9 +141,9 @@
1.13 g_pJIT = g_LibSys.OpenLibrary(file, myerror, sizeof(myerror));
1.14 if (!g_pJIT)
1.15 {
1.16 - if (error && err_max)
1.17 + if (error && maxlength)
1.18 {
1.19 - snprintf(error, err_max, "%s (failed to load bin/sourcepawn.jit.x86.%s)",
1.20 + snprintf(error, maxlength, "%s (failed to load bin/sourcepawn.jit.x86.%s)",
1.21 myerror,
1.22 PLATFORM_LIB_EXT);
1.23 }
1.24 @@ -155,9 +155,9 @@
1.25 if (!jit_init)
1.26 {
1.27 ShutdownJIT();
1.28 - if (error && err_max)
1.29 + if (error && maxlength)
1.30 {
1.31 - snprintf(error, err_max, "Failed to find GiveEnginePointer in JIT!");
1.32 + snprintf(error, maxlength, "Failed to find GiveEnginePointer in JIT!");
1.33 }
1.34 return false;
1.35 }
1.36 @@ -165,9 +165,9 @@
1.37 if ((err=jit_init(g_pSourcePawn)) != 0)
1.38 {
1.39 ShutdownJIT();
1.40 - if (error && err_max)
1.41 + if (error && maxlength)
1.42 {
1.43 - snprintf(error, err_max, "GiveEnginePointer returned %d in the JIT", err);
1.44 + snprintf(error, maxlength, "GiveEnginePointer returned %d in the JIT", err);
1.45 }
1.46 return false;
1.47 }
1.48 @@ -177,9 +177,9 @@
1.49 if (!jit_get)
1.50 {
1.51 ShutdownJIT();
1.52 - if (error && err_max)
1.53 + if (error && maxlength)
1.54 {
1.55 - snprintf(error, err_max, "JIT is missing a necessary export!");
1.56 + snprintf(error, maxlength, "JIT is missing a necessary export!");
1.57 }
1.58 return false;
1.59 }
1.60 @@ -188,9 +188,9 @@
1.61 if (!num || ((g_pVM=jit_get(0)) == NULL))
1.62 {
1.63 ShutdownJIT();
1.64 - if (error && err_max)
1.65 + if (error && maxlength)
1.66 {
1.67 - snprintf(error, err_max, "JIT did not export any virtual machines!");
1.68 + snprintf(error, maxlength, "JIT did not export any virtual machines!");
1.69 }
1.70 return false;
1.71 }
1.72 @@ -199,9 +199,9 @@
1.73 if (api != SOURCEPAWN_VM_API_VERSION)
1.74 {
1.75 ShutdownJIT();
1.76 - if (error && err_max)
1.77 + if (error && maxlength)
1.78 {
1.79 - snprintf(error, err_max, "JIT is not a compatible version");
1.80 + snprintf(error, maxlength, "JIT is not a compatible version");
1.81 }
1.82 return false;
1.83 }