From 85327cde8e451b8b1bacd1f5a98c034a6f42e5ea Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 31 Dec 2013 03:48:02 -0200 Subject: Fixed issues pointed out in Report 7909 Special Thanks to Vader. http://hercules.ws/board/tracker/issue-7909-some-code-errors-and-optimisations/ Signed-off-by: shennetsind --- src/map/script.c | 2 +- src/map/status.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map') diff --git a/src/map/script.c b/src/map/script.c index a9ad69954..20485d880 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -910,7 +910,7 @@ const char* parse_variable(const char* p) { const char *var = p; if( ( p[0] == '+' && p[1] == '+' && (type = C_ADD_PRE) ) // pre ++ - || ( p[1] == '-' && p[1] == '-' && (type = C_SUB_PRE) ) // pre -- + || ( p[0] == '-' && p[1] == '-' && (type = C_SUB_PRE) ) // pre -- ) { var = p = script->skip_space(&p[2]); } diff --git a/src/map/status.c b/src/map/status.c index 7d354718d..290882e05 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2071,9 +2071,9 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt) { struct status_data *masterstatus = status->get_base_status(mbl); if ( masterstatus ) { if( battle_config.slaves_inherit_speed&(masterstatus->mode&MD_CANMOVE?1:2) ) - masterstatus->speed = masterstatus->speed; - if( masterstatus->speed < 2 ) /* minimum for the unit to function properly */ - masterstatus->speed = 2; + mstatus->speed = masterstatus->speed; + if( mstatus->speed < 2 ) /* minimum for the unit to function properly */ + mstatus->speed = 2; } } -- cgit v1.2.3-70-g09d2