tjw: Thanks for notifying me about the typos. I have changed the g_local.c to g_local.h. However in cg_loadpanel.c it should only keep the w, variable. X isn’t used in the code.
bani: The reason I phrased it as ‘should be’ was because I have no way of checking if it was actually fixed. In retrospect it wasn’t needed. Anyway I wasn’t able to reproduce the crash by the time I copied rains code in the first place, however now I think I am. So I installed a clean 2.56 and used a clean 2.56 sdk, where I only added this command to g_svcmds.c:
if (Q_stricmp (cmd, "testssc") == 0) {
// | 1
// | 1 2 3 4 5 6 7 8 9 0 1
// | 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
// trap_SendServerCommand( -1, va("print \"Testing very long server commands: This one should work. 100 200 300 400 500 600 700 800 900 1000 1010 1020
\"") );
trap_SendServerCommand( -1, va("print \"Testing very long server commands: This one should crash. 100 200 300 400 500 600 700 800 900 1000 1010 1020a
\"") );
return qtrue;
}
When using the crash line, the game disconnects with this error:
] estssc
********************
ERROR: CL_ParseServerMessage: Illegible server message 0
********************
When I add the command to a clean 2.60 source tree. And disable the longer-than-1022 check in trap_sendservercommand the 2.60 ET crashes in the same way that the 2.56 did.
Am I missing something here?