diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-01-06 06:00:30 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-01-06 06:00:30 +0000 |
commit | 5d4fc21ddfe38fc84890467468f4e2d1cf1ce826 (patch) | |
tree | cd3bb91c8a6de8281b21fbf38758f1eeba54c290 | |
parent | 89a2217fe54bce2779485f633c9a4e64d9271433 (diff) | |
download | hercules-5d4fc21ddfe38fc84890467468f4e2d1cf1ce826.tar.gz hercules-5d4fc21ddfe38fc84890467468f4e2d1cf1ce826.tar.bz2 hercules-5d4fc21ddfe38fc84890467468f4e2d1cf1ce826.tar.xz hercules-5d4fc21ddfe38fc84890467468f4e2d1cf1ce826.zip |
* Fixed script command 'deletearray' deleting incorrect amount of array elements from arrays with empty elements (bugreport:4628).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14652 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 4 | ||||
-rw-r--r-- | doc/script_commands.txt | 9 | ||||
-rw-r--r-- | src/map/script.c | 3 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 7807df458..c7fd00ea3 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -1,6 +1,8 @@ Date Added -2010/01/05 +2011/01/06 + * Fixed script command 'deletearray' deleting incorrect amount of array elements from arrays with empty elements (bugreport:4628). [Ai4rei] +2011/01/05 * Fixed ends of statement blocks missing script EOL processing, thus causing 'next line' label (-) to misbehave in statement blocks without additional curly braces (bugreport:4417, since r3422). [Ai4rei] 2011/01/04 * Added support for removal of trailing comments to sv_readdb (bugreport:4680). [Ai4rei] diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 383a3c301..edca5e037 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -4,7 +4,7 @@ //= A reference manual for the eAthena scripting language. //= Commands are sorted depending on their functionality. //===== Version =========================================== -//= 3.34.20101217 +//= 3.35.20110106 //========================================================= //= 1.0 - First release, filled will as much info as I could //= remember or figure out, most likely there are errors, @@ -153,6 +153,8 @@ //= behavior. [Ai4rei] //= 3.34.20101217 //= Spellcheck. [Ai4rei] +//= 3.35.20110106 +//= Removed bug warning from 'deletearray'. [Ai4rei] //========================================================= This document is a reference manual for all the scripting commands and functions @@ -2105,11 +2107,6 @@ array, shifting all the elements beyond this towards the beginning. deletearray @array[1],3 -IMPORTANT: deletarray is horribly broken since the earliest days of jAthena. It -tends to merrily remove much more variables than it's told to remove, which -makes it pretty much useless for anything other than removing an array from -memory entirely. This would be very handy, if it always worked. - --------------------------------------- ====================================== diff --git a/src/map/script.c b/src/map/script.c index 559b19e25..d6b083fa3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5147,7 +5147,8 @@ BUILDIN_FUNC(deletearray) return 0;// no player attached } - end = getarraysize(st, id, start, is_string_variable(name), reference_getref(data)); + end = SCRIPT_MAX_ARRAYSIZE; + if( start >= end ) return 0;// nothing to free |