diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-21 03:17:04 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-21 03:17:04 +0000 |
commit | 9a9f2f96e03fff71cace60bcafb20483680aa8ff (patch) | |
tree | 82e65fa3d8700e74c92b6e3630c62b908eaa8a7b | |
parent | 63a75ab2f267cd8b38eec0d86fa348cf99dcdf2a (diff) | |
download | hercules-9a9f2f96e03fff71cace60bcafb20483680aa8ff.tar.gz hercules-9a9f2f96e03fff71cace60bcafb20483680aa8ff.tar.bz2 hercules-9a9f2f96e03fff71cace60bcafb20483680aa8ff.tar.xz hercules-9a9f2f96e03fff71cace60bcafb20483680aa8ff.zip |
- Fixed while statements not "reserving" the curly before parsing the test expression.
Ref: http://www.eathena.ws/board/index.php?showtopic=134596
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9680 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | src/map/script.c | 5 | ||||
-rw-r--r-- | src/map/skill.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index aca1fc4c9..1586c7fb3 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,9 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2007/01/21 + * Fixed while statements not "reserving" the curly before parsing the test + expression. [FlavioJS] 2007/01/20 * Fixed some joker's code trying to dereference a null pointer * Fixed the server not reacting properly to atcommands/charcommands when using diff --git a/src/map/script.c b/src/map/script.c index dee24cdc9..b4e484c44 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -61,8 +61,11 @@ #define script_hasdata(st,i) ( (st)->end > (st)->start + (i) ) /// Returns the index of the last data in the stack #define script_lastdata(st) ( (st)->end - (st)->start - 1 ) +/// Pushes an int into the stack #define script_pushint(st,val) push_val((st)->stack, C_INT, (val)) +/// Returns if the stack data is a string #define script_isstring(data) ( (data)->type == C_STR || (data)->type == C_CONSTSTR ) +/// Returns if the stack data is an int #define script_isint(data) ( (data)->type == C_INT ) #define FETCH(n, t) \ @@ -1368,13 +1371,13 @@ const char* parse_syntax(const char* p) { // 条件が偽なら終了地点に飛ばす sprintf(label,"__WL%x_FIN",syntax.curly[syntax.curly_count].index); + syntax.curly_count++; add_scriptl(add_str("jump_zero")); add_scriptc(C_ARG); p=parse_expr(p); p=skip_space(p); add_scriptl(add_str(label)); add_scriptc(C_FUNC); - syntax.curly_count++; return p; } break; diff --git a/src/map/skill.c b/src/map/skill.c index 9b03b721e..4ead739b4 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8039,7 +8039,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t if(!battle_config.duel_allow_teleport && sd->duel_group) { // duel restriction [LuzZza] clif_displaymessage(sd->fd, "Duel: Can't use warp in duel."); return 0; - } + } break; case MO_CALLSPIRITS: if(sd->spiritball >= lv) { |