Decompile fn_02596 (MakeResourcePath)
Batch #17598 by eAthena: 1 byte-identical, 0 confirmed by peer review. - fn_02596 MakeResourcePath: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
ab0be0656e
commit
02f7f04ecb
1 changed files with 5 additions and 3 deletions
|
|
@ -3,6 +3,9 @@
|
|||
#include "Utility/Hash/GGHashMgr.h"
|
||||
#include <cstring>
|
||||
#include <shlwapi.h>
|
||||
#include <string>
|
||||
|
||||
template __declspec(noinline) std::string& std::string::replace(const size_type, const size_type, const char* const, const size_type);
|
||||
|
||||
// STRING: st_14242
|
||||
static char g_dataDirectory[] = "data\\";
|
||||
|
|
@ -16,9 +19,8 @@ std::string MakeResourcePath(std::string filename) {
|
|||
path = path.substr(path.find(":") - 1);
|
||||
}
|
||||
|
||||
std::size_t duplicate;
|
||||
while ((duplicate = path.find("//")) != std::string::npos) {
|
||||
path.replace(duplicate, 2, "/", 1);
|
||||
while (path.find("//") != std::string::npos) {
|
||||
path.replace(path.find("//"), 2, "/", 1);
|
||||
}
|
||||
|
||||
return path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue