Possible buffer overflow? -
Kyle - 01.09.2012
Hi, someone on my forum posted this screen, in the location textdaw top right, it displays the client text that was said before.
Do you know how I could locate where this is caused by, the client text uses a global variable but is cleaned when format is used.
There is no crash error in crashdetect.
Thanks.
Re: Possible buffer overflow? -
Kyle - 01.09.2012
Anyone?
Re: Possible buffer overflow? -
CoDeZ - 01.09.2012
Maybe you didn't use TextDrawSetString under the textdraw you want so it called the last stored message in the global variable?
Re: Possible buffer overflow? -
Kyle - 02.09.2012
Anyone else?
AW: Possible buffer overflow? -
Nero_3D - 02.09.2012
Actually I still dont know what your problem is,
there is a textdraw which displays the last client message for the player
and the it somewhy uses a global variable which is cleaned by format ?
Re: AW: Possible buffer overflow? -
Kyle - 04.09.2012
Quote:
Originally Posted by Nero_3D
Actually I still dont know what your problem is,
there is a textdraw which displays the last client message for the player
and the it somewhy uses a global variable which is cleaned by format ?
|
It doesn't always display the last client text, only sometimes.
and it doesn't need to be cleaned as the format clears it and doesn't strcat.
Re: Possible buffer overflow? -
leonardo1434 - 04.09.2012
some code would help yourself.
Re: Possible buffer overflow? -
Kyle - 04.09.2012
Quote:
Originally Posted by leonardo1434
some code would help yourself.
|
It's very hard to give code when it could be any client text at any time.
AW: Possible buffer overflow? -
Nero_3D - 07.09.2012
You use a custom client message function, dont you ?
pawn Код:
stock ClientMesage(playerid, color, text[]) {
print(text); // check if it was called an SCM is bugged (although I dont belive that)
SendClientMessage(playerid, color, text);
TextDrawSetString(textdrawid, text);
}
SendClientMessage is directly called
The only possiblitly left is that the function ClientMessage wasnt called at all
Therefore you can only search for all ClientMessage and test the function / command in game