Procházet zdrojové kódy

- Fixed a sad crash in the login-txt server. Thanks to Flavio JS for pointing it out.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8352 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex před 19 roky
rodič
revize
abdabdde14
2 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 2 2
      src/login/login.c
  2. 1 1
      src/map/skill.c

+ 2 - 2
src/login/login.c

@@ -3337,7 +3337,7 @@ int parse_login(int fd) {
 
 		case 0x7530:	// Request of the server version
 			login_log("Sending of the server version (ip: %s)" RETCODE, ip);
-                        WFIFOHEAD(fd, 10);
+			WFIFOHEAD(fd, 10);
 			WFIFOW(fd,0) = 0x7531;
 			WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
 			WFIFOB(fd,3) = ATHENA_MINOR_VERSION;
@@ -3365,7 +3365,7 @@ int parse_login(int fd) {
 			} else {
 				struct login_session_data *ld = (struct login_session_data*)session[fd]->session_data;
 				if (RFIFOW(fd,2) == 0) {	// non encrypted password
-					char* password="";
+					char password[25];
 					memcpy(password, RFIFOP(fd,4), 24);
 					password[24] = '\0';
 					remove_control_chars((unsigned char *)password);

+ 1 - 1
src/map/skill.c

@@ -8265,7 +8265,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
 	case GD_REGENERATION:
 	case GD_RESTORE:
 		//Emergency Recall is handled on skill_notok
-		if (skill != GD_EMERGENCYCALL && !agit_flag) {
+		if (!agit_flag) {
 			clif_skill_fail(sd,skill,0,0);
 			return 0;
 		}