forked from jaildesigner-jailgames/jaildoctors_dilemma
Arreglado un bug a la hora de buscar por nombre los recursos
This commit is contained in:
@@ -26,7 +26,10 @@ std::string Asset::get(std::string text)
|
||||
{
|
||||
for (auto f : fileList)
|
||||
{
|
||||
if (f.file.find(text) != std::string::npos)
|
||||
const size_t lastIndex = f.file.find_last_of("/")+1;
|
||||
const std:: string file = f.file.substr(lastIndex, std::string::npos);
|
||||
|
||||
if (file == text)
|
||||
{
|
||||
return f.file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user