diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-12-27 18:45:33 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-12-27 18:45:33 +0000 |
commit | f5d5ec4f9f07273fa788653ad8622d22242ee2d7 (patch) | |
tree | bfc4ad2e4caa8d431d14967336bc8649aa576da4 | |
parent | b9e470f8ecc1441c5377a0fec838abb6773d331d (diff) | |
download | hercules-f5d5ec4f9f07273fa788653ad8622d22242ee2d7.tar.gz hercules-f5d5ec4f9f07273fa788653ad8622d22242ee2d7.tar.bz2 hercules-f5d5ec4f9f07273fa788653ad8622d22242ee2d7.tar.xz hercules-f5d5ec4f9f07273fa788653ad8622d22242ee2d7.zip |
Removed an incorrect range check and fixed a copypaste typo which caused script engine errors / crashes (see r11984)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11987 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/pc.c | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 5c15798d1..d6ce9905d 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2007/12/27 + * Removed an incorrect range check and fixed a copypaste typo which + caused script engine errors / crashes (see r11984) * Re-added a missing mob last_thinktime timer initialization when a mob spawns, causing mob AI to freeze (mistake in r11964) [ultramage] * Changed the configure script: diff --git a/src/map/pc.c b/src/map/pc.c index 5c5b08a49..295bc3b3b 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5904,7 +5904,7 @@ int pc_setreg(struct map_session_data* sd, int reg, int val) } ARR_FIND( 0, sd->reg_num, i, sd->reg[i].data == 0 ); - if( i == sd->regstr_num ) + if( i == sd->reg_num ) {// nothing free, increase size sd->reg_num++; RECREATE(sd->reg, struct script_reg, sd->reg_num); @@ -5936,11 +5936,6 @@ int pc_setregstr(struct map_session_data* sd, int reg, char* str) nullpo_retr(0, sd); - if(str && strlen(str)+1 >= sizeof(sd->regstr[0].data)){ - ShowWarning("pc_setregstr: string too long !\n"); - return 0; - } - ARR_FIND( 0, sd->regstr_num, i, sd->regstr[i].index == reg ); if( i < sd->regstr_num ) {// found entry, update |