fix for random linux crashes (from spike)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@552 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
b628d14df0
commit
ab41bbb0a7
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ void Plug_RegisterBuiltin(char *name, Plug_Builtin_t bi, int flags)
|
||||||
while(newnum < numplugbuiltins && plugbuiltins[newnum].func)
|
while(newnum < numplugbuiltins && plugbuiltins[newnum].func)
|
||||||
newnum+=128;
|
newnum+=128;
|
||||||
|
|
||||||
if (newnum > numplugbuiltins)
|
if (newnum >= numplugbuiltins)
|
||||||
{
|
{
|
||||||
numplugbuiltins = newnum+128;
|
numplugbuiltins = newnum+128;
|
||||||
plugbuiltins = BZ_Realloc(plugbuiltins, sizeof(Plug_Plugins_t)*numplugbuiltins);
|
plugbuiltins = BZ_Realloc(plugbuiltins, sizeof(Plug_Plugins_t)*numplugbuiltins);
|
||||||
|
@ -78,7 +78,7 @@ static void Plug_RegisterBuiltinIndex(char *name, Plug_Builtin_t bi, int flags,
|
||||||
|
|
||||||
newnum++;
|
newnum++;
|
||||||
|
|
||||||
if (newnum > numplugbuiltins)
|
if (newnum >= numplugbuiltins)
|
||||||
{
|
{
|
||||||
numplugbuiltins = newnum+128;
|
numplugbuiltins = newnum+128;
|
||||||
plugbuiltins = BZ_Realloc(plugbuiltins, sizeof(Plug_Plugins_t)*numplugbuiltins);
|
plugbuiltins = BZ_Realloc(plugbuiltins, sizeof(Plug_Plugins_t)*numplugbuiltins);
|
||||||
|
|
Loading…
Reference in a new issue