all repos — mgba @ 13d3e1dfecb6393c0f3f23e22b2e9e88afe4911a

mGBA Game Boy Advance Emulator

Qt: Fix paths getting truncated at first . (fixes #867)
Vicki Pfau vi@endrift.com
Thu, 07 Sep 2017 21:52:51 -0700
commit

13d3e1dfecb6393c0f3f23e22b2e9e88afe4911a

parent

10a5432df72a68bf178163954e2dafdc92f7a742

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/platform/qt/CoreManager.cppsrc/platform/qt/CoreManager.cpp

@@ -99,10 +99,10 @@ } else {

core->loadROM(core, vf); } - QFileInfo info(base + "/" + path); - QByteArray bytes(info.baseName().toUtf8()); - strncpy(core->dirs.baseName, bytes.constData(), sizeof(core->dirs.baseName)); + QByteArray bytes(path.toUtf8()); + separatePath(bytes.constData(), nullptr, core->dirs.baseName, nullptr); + QFileInfo info(base + "/" + path); bytes = info.dir().canonicalPath().toUtf8(); mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData())); mCoreAutoloadSave(core);