Fix issue in strgen

This commit is contained in:
2024-06-09 19:06:55 +02:00
parent c2f9d89802
commit 6ce3ebb7fd

View File

@@ -653,8 +653,8 @@ int CDECL main(int argc, char *argv[])
if (_errors != 0) return 1; if (_errors != 0) return 1;
/* get the targetfile, strip any directories and append to destination path */ /* get the targetfile, strip any directories and append to destination path */
r = strrchr(argument, PATHSEPCHAR); r = strrchr(translation.data(), PATHSEPCHAR);
mkpath(pathbuf, lastof(pathbuf), dest_dir.c_str(), (r != nullptr) ? &r[1] : argument); mkpath(pathbuf, lastof(pathbuf), dest_dir.c_str(), (r != nullptr) ? &r[1] : translation.c_str());
/* rename the .txt (input-extension) to .lng */ /* rename the .txt (input-extension) to .lng */
r = strrchr(pathbuf, '.'); r = strrchr(pathbuf, '.');