[SA-MP 0.3c] Crash Server
#1

This is code crash samp server when i write in chat.
Im using this code in public OnPlayerText.
But the most interesting thing that this code works on some servers, even though the version is the same everywhere

Код:
enum CLENUM
{
CLName[4],
CLID[9]
};

stock CLTEXT[][CLENUM] = {
{ "#BL",          "{1B1BE0}" },
{ "#PI",          "{E81CC9}" },
{ "#YE",          "{DBED15}" },
{ "#LY",          "{8CED15}" },
{ "#LB",          "{15D4ED}" },
{ "#RD",          "{FF0000}" },
{ "#GR",          "{BABABA}" },
{ "#WH",          "{FFFFFF}" },
{ "#OR",          "{FFD800}" },
{ "#GN",          "{37DB45}" },
{ "#BK",          "{000000}" },
{ "#GY",          "{B6FF00}" }};


new name[256];
format(name, sizeof(name), "%s(%d): {FFFFFF}%s", Player[playerid][pName], playerid,text);
new pos = -1,i;
while(i!=12)
{
    if((pos = strfind(name, CLTEXT[i][CLName], true,pos)) != -1)
    {
      strdel(name, pos, pos+3);
      strins(name, CLTEXT[i][CLID], pos);
      i = -1;
    }
i++;
}
and server creates crashinfo

Код:
--------------------------

SA-MP Server: 0.3c



Exception At Address: 0x7E428736



Registers:

EAX: 0xFFFFFFFF	EBX: 0x012A3608	ECX: 0x012A3604	EDX: 0x00000000

ESI: 0xFFFFFFFF	EDI: 0xFFFFFFFF	EBP: 0x0012F518	ESP: 0x0012F510

EFLAGS: 0x00010286



Stack:

+0000: 0x00000000   0x012A3604   0x01267438   0x00406779

+0010: 0xFFFFFFFF   0xFFFFFFFF   0x012A35EC   0x7E428717

+0020: 0x012A3604   0x00406965   0x01267438   0x00000001

+0030: 0x00000003   0xFFFFFFFF   0x0121159C   0x012239B0

+0040: 0x00FB2CA0   0x00FB2CA0   0x00000023   0x00000003

+0050: 0x012A3608   0x0000001A   0x00401096   0x00FB2CA0

+0060: 0x01267438   0x01264188   0x00402BB3   0x00FB2CA0

+0070: 0x00000057   0x0012F59C   0x012A35EC   0x00000000

+0080: 0x00FB2CA0   0x0012F638   0x00000004   0x000032B0

+0090: 0x00003280   0x0003F464   0x0003F6E4   0x000384EC

+00A0: 0x0003F6D0   0x000384EC   0x0121159C   0x01264188

+00B0: 0x00000000   0x01210020   0x00052BEC   0x00482C12

+00C0: 0x00FB2CA0   0x0012F60C   0x00000025   0x00FB2CA0

+00D0: 0x00000000   0x00FB2CA0   0x0012F610   0x0012F618

+00E0: 0x0012F638   0x0129C660   0x00000000   0x00F7C0E0

+00F0: 0x0012F860   0x00FDEFE8   0x00000000   0x00000001

+0100: 0x000384D8   0x0049C298   0x0129C660   0x00000025

+0110: 0x0012F86C   0x00B1AEA8   0x01000001   0x60020A74

+0120: 0x0012F804   0x00FB2CA0   0x61647361   0x00000000

+0130: 0x00000000   0x00000000   0x00000000   0x00000000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)