Possible buffer overflow?
#1

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.
Reply
#2

Anyone?
Reply
#3

Maybe you didn't use TextDrawSetString under the textdraw you want so it called the last stored message in the global variable?
Reply
#4

Anyone else?
Reply
#5

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 ?
Reply
#6

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.
Reply
#7

some code would help yourself.
Reply
#8

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.
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)