Skip to content

Commit

Permalink
Update AccuracyUtil.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileYzn authored Jun 18, 2024
1 parent a3ea4df commit b712fc3
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions AccuracyFix/AccuracyUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,16 @@ const char* CAccuracyUtil::GetPath()

std::replace(this->m_Path.begin(), this->m_Path.end(), (char)(92), (char)(47));

auto Position = this->m_Path.find_last_of((char)(47));
this->m_Path.erase(this->m_Path.find_last_of((char)(47)), this->m_Path.length());

if (Position != std::string::npos)
{
this->m_Path.erase(Position, this->m_Path.length());
}

while (std::count(this->m_Path.begin(), this->m_Path.end(), (char)(47)) > 1)
{
Position = this->m_Path.find_last_of((char)(47));

if (Position != std::string::npos)
{
this->m_Path.erase(Position, this->m_Path.length());
}
this->m_Path.erase(this->m_Path.find_last_of((char)(47)), this->m_Path.length());
}
}
}
}

if (!this->m_Path.empty())
{
g_engfuncs.pfnServerPrint(this->m_Path.c_str());
}

return this->m_Path.c_str();
}

Expand Down

0 comments on commit b712fc3

Please sign in to comment.