AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Bug with reading big messages in AMX (https://forums.alliedmods.net/showthread.php?t=25)

CheesyPeteza 02-04-2004 13:00

Bug with reading big messages in AMX
 
Dunno if this is the right place to post this, but I can't see a better place. :D

There is a bug with registering messages in Olo's version of amx. If the message which is being read has too many values then the server will crash. This problem appears with the Natural-Selection mod as there is a few messages which have more than the 32 values in them (the biggest I've seen is 54).

The simple solution is to increase the size of the array in CEvent.h line 34:

#define MAX_PARSE_VALUES 32

64 should be fine. Although if you can be bothered it'd be a good idea to make sure it doesn't crash in CEvent.cpp line 223:

Code:

void EventsMngr::parseValue(int iValue) {
  if ( !parseNotDone ) return;
  parseVault[++parsePos].type = MSG_INTEGER;
  parseVault[parsePos].iValue = iValue;
  bool skip;
  for (ClEvent*p=parseFun;p;p=p->next){
    if ( p->done || !p->cond[parsePos] ) continue;
    skip = false;
        ClEvent::cond_t* a = p->cond[parsePos];
        do {
      switch(a->type){              <-- CRASH here


Manip 02-05-2004 00:29

I might have fixed that, dunno......

PM 02-26-2004 14:39

fixed, tested on a simulated msg with 202 parameters :D


All times are GMT -4. The time now is 00:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.