mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 13:00:15 +02:00
Filesystem: Fix Absolute() on Windows
sizeof(*Fill) will only ever be 1, so we wouldn't actually copy much of anything.
This commit is contained in:
1 parent
fe6d6397d6
commit
c878a89e95
1 file changed
+2
-1
@@ -391,7 +391,8 @@ inline char* Absolute(const char* Path, char Fill[PATH_MAX]) {
|
||||
std::error_code ec;
|
||||
const auto PathAbsolute = std::filesystem::absolute(Path, ec);
|
||||
if (!ec) {
|
||||
strncpy(Fill, PathAbsolute.string().c_str(), sizeof(*Fill));
|
||||
auto end = PathAbsolute.string().copy(Fill, PATH_MAX - 1);
|
||||
Fill[end] = '\0';
|
||||
return Fill;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user