Explorar o código

Minor update to atcommand_jailfor and atcommand_char_ban's modif_p var incrementation for minute-based bans/jails.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13910 54d463be-8e91-2dee-dedb-b68131a5f0ec
Paradox924X %!s(int64=16) %!d(string=hai) anos
pai
achega
c52de2b250
Modificáronse 2 ficheiros con 10 adicións e 2 borrados
  1. 2 0
      Changelog-Trunk.txt
  2. 8 2
      src/map/atcommand.c

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ 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.
 
+09/06/23
+	* Minor update to atcommand_jailfor and atcommand_char_ban's modif_p var incrementation for minute-based bans/jails. [Paradox924X]
 09/06/20
 	* Changed Asura Strike/Jump Kick to target skill to get rid of the "target delay". (bugreport:2174) [Inkfish]
 09/06/19

+ 8 - 2
src/map/atcommand.c

@@ -3347,7 +3347,10 @@ int atcommand_char_ban(const int fd, struct map_session_data* sd, const char* co
 			if (modif_p[0] == 's') {
 				second = value;
 				modif_p++;
-			} else if (modif_p[0] == 'n' || (modif_p[0] == 'm' && modif_p[1] == 'n')) {
+			} else if (modif_p[0] == 'n') {
+				minute = value;
+				modif_p++;
+			} else if (modif_p[0] == 'm' && modif_p[1] == 'n') {
 				minute = value;
 				modif_p = modif_p + 2;
 			} else if (modif_p[0] == 'h') {
@@ -5010,7 +5013,10 @@ int atcommand_jailfor(const int fd, struct map_session_data* sd, const char* com
 				modif_p++;
 			while (modif_p[0] >= '0' && modif_p[0] <= '9')
 				modif_p++;
-			if (modif_p[0] == 'n' || (modif_p[0] == 'm' && modif_p[1] == 'n')) {
+			if (modif_p[0] == 'n') {
+				minute = value;
+				modif_p++;
+			} else if (modif_p[0] == 'm' && modif_p[1] == 'n') {
 				minute = value;
 				modif_p = modif_p + 2;
 			} else if (modif_p[0] == 'h') {