소스 검색

Follow up to 1a85e1c925af94452adf6a4478aab914df0eadd7 (#9201)

Daegaladh 1 개월 전
부모
커밋
608cdc96c1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/map/pc.cpp

+ 1 - 1
src/map/pc.cpp

@@ -2951,7 +2951,7 @@ uint16 pc_getpercentweight(map_session_data& sd, uint32 weight)
 {
 	if (weight == 0)
 		weight = sd.weight;
-	return static_cast<uint16>(weight * 100 / sd.max_weight);
+	return static_cast<uint16>(weight * 100 / std::max<uint32>(sd.max_weight, 1));
 }
 
 /*==========================================