Jelajahi Sumber

Fix possible out of bounds (#7630)

Vincent Stumpf 2 tahun lalu
induk
melakukan
6a0b7afd88
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/map/pc.cpp

+ 1 - 1
src/map/pc.cpp

@@ -13569,7 +13569,7 @@ uint64 JobDatabase::parseBodyNode(const ryml::NodeRef& node) {
 						continue;
 					}
 
-					if (constant < W_FIST || constant > max) {
+					if (constant < W_FIST || constant >= max) {
 						this->invalidWarning(aspdNode["BaseASPD"], "Invalid weapon type %s specified for %s, skipping.\n", weapon.c_str(), job_name.c_str());
 						continue;
 					}