---------------------------------------------------------------------------
Fixed memory bug found by fysh
This commit is contained in:
parent
0c36613352
commit
79268c5316
@ -139,7 +139,7 @@ public:
|
|||||||
if (index >= (int)len || index < 0)
|
if (index >= (int)len || index < 0)
|
||||||
return npos;
|
return npos;
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
for (i=index; i<(int)len; i++)
|
for (i=index; i<(unsigned int)len; i++)
|
||||||
{
|
{
|
||||||
if (v[i] == c)
|
if (v[i] == c)
|
||||||
{
|
{
|
||||||
@ -271,7 +271,7 @@ public:
|
|||||||
num = len - index;
|
num = len - index;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int i = 0, j=0;
|
unsigned int i = 0;
|
||||||
unsigned int nslen = num + 2;
|
unsigned int nslen = num + 2;
|
||||||
|
|
||||||
ns.Grow(nslen);
|
ns.Grow(nslen);
|
||||||
|
@ -690,7 +690,7 @@ int loadModules(const char* filename, PLUG_LOADTIME now)
|
|||||||
#ifndef FAKEMETA
|
#ifndef FAKEMETA
|
||||||
if ( cc->IsMetamod())
|
if ( cc->IsMetamod())
|
||||||
{
|
{
|
||||||
char* mmpathname = build_pathname_addons("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxmodx/modules"), line);
|
char* mmpathname = build_pathname_addons("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxmodx/modules"), line.c_str());
|
||||||
ConvertModuleName(mmpathname, path);
|
ConvertModuleName(mmpathname, path);
|
||||||
cc->attachMetamod(path.c_str(), now);
|
cc->attachMetamod(path.c_str(), now);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user