瀏覽代碼

Fix warning when sending party message (#7350)

Fixes #7344
Thanks @24msz6eo
Vincent Stumpf 2 年之前
父節點
當前提交
e28fb93f1e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/map/clif.cpp

+ 1 - 1
src/map/clif.cpp

@@ -8058,7 +8058,7 @@ void clif_party_message( struct party_data& party, uint32 account_id, const char
 		return;
 	}
 
-	if( len ){
+	if (len > CHAT_SIZE_MAX) {
 		ShowWarning( "clif_party_message: Truncated message '%s' (len=%d, max=%" PRIuPTR ", party_id=%d).\n", mes, len, CHAT_SIZE_MAX, party.party.party_id );
 		len = CHAT_SIZE_MAX;
 	}