浏览代码

Fixed incorrect usage of sv_escape_c() in TXT's login_log function, which produced malformed log entries (caused by r12489).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13408 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 16 年之前
父节点
当前提交
285441dd41
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/login/loginlog_txt.c

+ 2 - 2
src/login/loginlog_txt.c

@@ -44,8 +44,8 @@ void login_log(uint32 ip, const char* username, int rcode, const char* message)
 		time_t raw_time;
 		char str_time[24];
 
-		sv_escape_c(esc_username, username, NAME_LENGTH, NULL);
-		sv_escape_c(esc_message, message, 255, NULL);
+		sv_escape_c(esc_username, username, safestrnlen(username,NAME_LENGTH), NULL);
+		sv_escape_c(esc_message, message, safestrnlen(message,255), NULL);
 
 		time(&raw_time);
 		strftime(str_time, 24, login_config.date_format, localtime(&raw_time));