X-Men Ravages of Apolcalypse Bug
Moderator: InsideQC Admins
4 posts
• Page 1 of 1
X-Men Ravages of Apolcalypse Bug
In the first level, after getting all the keys you get a piece of the super weapon.
The message appears
... with a hologram of Magneto. And this message appears to be truncated.
This got reported as a modern ProQuake bug but it happens in every engine and doing some bug checking the string gets cut off at 255 characters. But the buffer reading the message is 1024 in size.
Is 255 or 256 some sort of message limitation in QuakeC or for centerprint in a way involving the protocol.
I'd just like to understand what is at play here. I'm not trying to extend a limit or anything ridiculous because I think 255 or 256 is plenty long. Just looking for infos.
The message appears
"Well done. You have found the first part of the only weapon able to defeat Apocalypse. You will find other components that have been seperated and hidden by Apocalypse. If you are unsuccessful the age of Apocalypse will be unavoidable... Good luck. (pr"
... with a hologram of Magneto. And this message appears to be truncated.
This got reported as a modern ProQuake bug but it happens in every engine and doing some bug checking the string gets cut off at 255 characters. But the buffer reading the message is 1024 in size.
Is 255 or 256 some sort of message limitation in QuakeC or for centerprint in a way involving the protocol.
I'd just like to understand what is at play here. I'm not trying to extend a limit or anything ridiculous because I think 255 or 256 is plenty long. Just looking for infos.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Ok ... here is why ...
Out is capped at 256 characters.
And ...
- Code: Select all
char *PF_VarString (int first)
{
int i;
static char out[256]; <------- Baker: Effective centerprint limit
Out is capped at 256 characters.
And ...
- Code: Select all
/*
=================
PF_centerprint
single print to a specific client
centerprint(clientent, value)
=================
*/
void PF_centerprint (void)
{
char *s;
client_t *client;
int entnum;
entnum = G_EDICTNUM(OFS_PARM0);
s = PF_VarString (1); <--------- Baker: THIS IS WHY
if (entnum < 1 || entnum > svs.maxclients)
{
Con_SafePrintf ("tried to sprint to a non-client\n");
return;
}
client = &svs.clients[entnum-1];
MSG_WriteChar (&client->message,svc_centerprint);
MSG_WriteString (&client->message, s );
}
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
was this fixed in LordHavoc's bug fixes?
http://icculus.org/twilight/darkplaces/files/X-MenROA_SourceCode_bugfixes20060705.zip
http://icculus.org/twilight/darkplaces/files/X-MenROA_SourceCode_bugfixes20060705.zip
-

Error - InsideQC Staff
- Posts: 865
- Joined: Fri Nov 05, 2004 5:15 am
- Location: VA, USA
Error wrote:was this fixed in LordHavoc's bug fixes?
http://icculus.org/twilight/darkplaces/files/X-MenROA_SourceCode_bugfixes20060705.zip
Doesn't look like it, I appear to be using that progs.dat as the filesize and date of July 2006 are identical.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest