Explorar el Código

hack-fixed http://bugs.vcmi.eu/view.php?id=2533

AlexVinS hace 9 años
padre
commit
34a494ade0
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      lib/filesystem/ResourceID.cpp

+ 5 - 1
lib/filesystem/ResourceID.cpp

@@ -44,7 +44,11 @@ static inline std::string readName(std::string name)
 		delimPos = name.find_last_of('\\');
 
 	if((delimPos == std::string::npos || delimPos < dotPos) && dotPos != std::string::npos)
-		name.resize(dotPos);
+	{
+		auto type = EResTypeHelper::getTypeFromExtension(name.substr(dotPos));
+		if(type != EResType::OTHER)
+			name.resize(dotPos);
+	}
 
 	toUpper(name);