Raised This Month: $12 Target: $400
 3% 

Bug with reading big messages in AMX


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CheesyPeteza
Senior Member
Join Date: Feb 2004
Location: UK
Old 02-04-2004 , 13:00   Bug with reading big messages in AMX
Reply With Quote #1

Dunno if this is the right place to post this, but I can't see a better place.

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
__________________
YO|Cheesy Peteza

[email protected]

CheesyPeteza is offline
Manip
Senior Member
Join Date: Jan 2004
Old 02-05-2004 , 00:29  
Reply With Quote #2

I might have fixed that, dunno......
Manip is offline
Send a message via AIM to Manip
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 02-26-2004 , 14:39  
Reply With Quote #3

fixed, tested on a simulated msg with 202 parameters
__________________
hello, i am pm
PM is offline
Old 06-13-2010, 10:55
MrMaCEEE
This message has been deleted by YamiKaitou. Reason: bumping really old thread
Old 06-13-2010, 11:51
drekes
This message has been deleted by YamiKaitou. Reason: bumping really old thread
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:55.


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