Bugs (1st thread RC3-RC6)
#7

Quote:
Originally Posted by /^We(stie|z+[e|a
r)$/ ]
#strins buffer overflow
pawn Code:
new string[] = ":(";
strins(string, ">", 0);
print(string);
Isn't this a good thing? It gives you, as the coder, an idea on how to deal with strings, etc. For example, if there's part of a string missing (that you need), unintentional things *might* happen. I'd rather have a crash instead of unintentional behaviour.
I think crashing is undesirable, if you need the string to be valid then you will have some other method of checking it rather than hoping the script will crash if it's too long. Besides the function has a maxlength parameter, so you would expect it to not overflow.
pawn Code:
native bool: strins(string[], const substr[], pos, maxlength=sizeof string);
Consider something like
pawn Code:
strreplace(string, "1", "one");
which is better: the string being truncated, or the script crashing?

EDIT: oh god, why is this still here
pawn Code:
// Take Cover
    if (strcmp("/hide", cmdtext, true, 3) == 0) {
        LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
        return 1;
    }
Reply


Messages In This Thread
Bugs (1st thread RC3-RC6) - by Dabombber - 02.09.2009, 07:35
Re: Bugs - by Baff - 02.09.2009, 07:42
Re: Bugs - by Kalcor - 02.09.2009, 07:42
Re: Bugs - by Dabombber - 02.09.2009, 08:03
Re: Bugs - by Google63 - 02.09.2009, 08:15
Re: Bugs - by Westie - 02.09.2009, 08:43
Re: Bugs - by Dabombber - 02.09.2009, 09:23
Re: 0.3 Bug report - by doughboy7 - 02.09.2009, 10:57
Re: Bugs - by lavamike - 02.09.2009, 11:03
Re: Bugs - by bogeymanEST - 02.09.2009, 12:24
Re: Bugs - by hipy - 02.09.2009, 12:25
Re: Bugs - by Y_Less - 02.09.2009, 12:25
Re: Bugs - by kc - 02.09.2009, 12:28
Re: Bugs - by sebihunter - 02.09.2009, 12:38
Re: Bugs - by hipy - 02.09.2009, 12:45
Re: Bugs - by Dabombber - 02.09.2009, 13:01
Re: Bugs - by CracK - 02.09.2009, 13:05
Re: Bugs - by sebihunter - 02.09.2009, 13:32
Re: Bugs - by sebihunter - 02.09.2009, 13:50
Re: Bugs - by mini_tomo_2 - 02.09.2009, 14:31
Re: Bugs - by gotenks918 - 02.09.2009, 17:01
Re: Bugs - by sebihunter - 02.09.2009, 17:11
Re: Bugs - by MenaceX^ - 02.09.2009, 17:30
Re: Bugs - by sebihunter - 02.09.2009, 17:35
Re: Bugs - by MenaceX^ - 02.09.2009, 17:36
Re: Bugs - by sebihunter - 02.09.2009, 17:37
Re: Bugs - by MenaceX^ - 02.09.2009, 17:47
Re: Bugs - by sebihunter - 02.09.2009, 17:50
Re: Bugs - by MenaceX^ - 02.09.2009, 17:56
Re: Bugs - by ғαιιοцт - 02.09.2009, 18:07
Re: Bugs - by Cristi0117 - 02.09.2009, 18:07
Re: Bugs - by Andom - 02.09.2009, 18:16
Re: Bugs - by Double-O-Seven - 02.09.2009, 18:30
Re: Bugs - by Misiek - 02.09.2009, 18:33
Re: Bugs - by DiDok - 02.09.2009, 19:05
Re: Bugs - by MPKaboose - 02.09.2009, 19:07
Re: Bugs - by [eLg]Timmy - 02.09.2009, 23:25
Re: Bugs - by Seoson - 03.09.2009, 00:16
Re: Bugs - by MasterOfQuebec - 03.09.2009, 02:24
Couple bugs I found - by Zezombia - 03.09.2009, 07:40
Re: Bugs - by dugi - 04.09.2009, 19:32
Re: Bugs - by Frankylez - 04.09.2009, 20:49
Re: Bugs - by eXchainZ-FoReVeR - 04.09.2009, 21:27
Re: Bugs - by Rainmaker - 04.09.2009, 21:52
Re: Bugs - by Zezombia - 04.09.2009, 23:07
Re: Bugs - by Gappy - 04.09.2009, 23:17
Re: Bugs - by pen_theGun - 04.09.2009, 23:50
Re: Bugs - by dugi - 05.09.2009, 00:06
Re: Bugs - by ғαιιοцт - 05.09.2009, 06:59
Re: Bugs - by BeckzyBoi - 05.09.2009, 09:10
Re: Bugs - by Gappy - 05.09.2009, 11:12
Re: Bugs - by pen_theGun - 05.09.2009, 11:39
Re: Bugs - by Balon - 05.09.2009, 12:15
Re: Bugs - by Brendan_Thomson - 05.09.2009, 14:41
Re: Bugs - by erorcun - 05.09.2009, 19:08
Re: Bugs - by Sergei - 05.09.2009, 19:15
Re: Bugs - by Rainmaker - 05.09.2009, 20:03
Re: Bugs - by hansen111 - 05.09.2009, 20:51
Re: Bugs - by Rainmaker - 05.09.2009, 22:05
Re: Bugs - by mini_tomo_2 - 05.09.2009, 22:12
Re: Bugs - by Abody-rules - 06.09.2009, 10:35
Re: Bugs - by Abody-rules - 06.09.2009, 11:24
Re: Bugs - by Sergei - 06.09.2009, 11:29
Re: Bugs - by hansen111 - 06.09.2009, 13:12
Re: Bugs - by Kalcor - 06.09.2009, 13:20
Re: Bugs - by XtremeChio - 06.09.2009, 13:32
Re: Bugs - by MPKaboose - 06.09.2009, 13:37
Re: Bugs - by BeckzyBoi - 06.09.2009, 13:57
Re: Bugs - by ғαιιοцт - 06.09.2009, 14:02
Re: Bugs - by On_Top_Non_Stop - 06.09.2009, 18:16
Re: Bugs - by CrunkBankS - 14.09.2009, 14:55
Re: Bugs - by SFather - 14.09.2009, 23:27
Re: Bugs - by On_Top_Non_Stop - 15.09.2009, 00:19
Re: Bugs - by Slice - 15.09.2009, 01:49
Re: Bugs - by Misiek - 15.09.2009, 09:44
Re: Bugs - by Tony_Arracardo - 15.09.2009, 13:00
Re: Bugs - by SpiderPork - 15.09.2009, 17:04
Re: Bugs - by heufix - 15.09.2009, 22:15
Re: Bugs - by Joe Staff - 16.09.2009, 18:40
Re: Bugs - by BeckzyBoi - 16.09.2009, 19:53
Re: Bugs - by TMasters - 21.09.2009, 06:56
Re: Bugs - by Abhishek - 21.09.2009, 07:32
Re: Bugs - by Dabombber - 21.09.2009, 10:29
Re: Bugs - by Dabombber - 21.09.2009, 12:11
Re: Bugs - by Dabombber - 21.09.2009, 14:52
Re: Bugs - by Sergei - 21.09.2009, 15:06
Re: Bugs - by Misiek - 21.09.2009, 15:16
Re: Bugs - by ғαιιοцт - 21.09.2009, 15:57
Re: Bugs - by BeckzyBoi - 21.09.2009, 16:24
Re: Bugs - by ғαιιοцт - 21.09.2009, 16:29
Re: Bugs - by BeckzyBoi - 21.09.2009, 16:34
Re: Bugs - by ғαιιοцт - 21.09.2009, 16:35
Re: Bugs - by BeckzyBoi - 21.09.2009, 16:48
Re: Bugs - by ғαιιοцт - 21.09.2009, 16:52
Re: Bugs - by BeckzyBoi - 21.09.2009, 17:27
Re: Bugs - by ғαιιοцт - 21.09.2009, 17:30
Re: Bugs - by Coicatak - 21.09.2009, 17:50
Re: Bugs - by Rainmaker - 21.09.2009, 18:04
Re: Bugs - by luby - 21.09.2009, 18:27
Re: Bugs - by luby - 21.09.2009, 18:48
Re: Bugs - by BeckzyBoi - 21.09.2009, 19:50
Re: Bugs (1st thread RC3-RC6) - by silvan - 26.09.2009, 22:47
Re: Bugs - by dre$tA - 03.10.2009, 04:05

Forum Jump:


Users browsing this thread: 3 Guest(s)