From e59f770ccbf61f012d148a390e7f76775ab2a02e Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sun, 9 Feb 2014 16:12:59 +0100 Subject: Revert "Merge pull request #49 from Parlane/sprintf_tidy" Change broke the build on Debian stable. This reverts commit 28755439b36ac8e875d764da5db31ad693459ace, reversing changes made to 64e01ec763d21915e7166e625f8a3e85b46fbcbb. --- Source/Core/Common/NandPaths.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'Source/Core/Common/NandPaths.cpp') diff --git a/Source/Core/Common/NandPaths.cpp b/Source/Core/Common/NandPaths.cpp index 52e3904536..3ca5550d40 100644 --- a/Source/Core/Common/NandPaths.cpp +++ b/Source/Core/Common/NandPaths.cpp @@ -12,16 +12,20 @@ namespace Common std::string GetTicketFileName(u64 _titleID) { - return StringFromFormat("%sticket/%08x/%08x.tik", - File::GetUserPath(D_WIIUSER_IDX).c_str(), - (u32)(_titleID >> 32), (u32)_titleID); + char TicketFilename[1024]; + sprintf(TicketFilename, "%sticket/%08x/%08x.tik", + File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(_titleID >> 32), (u32)_titleID); + + return TicketFilename; } std::string GetTitleDataPath(u64 _titleID) { - return StringFromFormat("%stitle/%08x/%08x/data/", - File::GetUserPath(D_WIIUSER_IDX).c_str(), - (u32)(_titleID >> 32), (u32)_titleID); + char path[1024]; + sprintf(path, "%stitle/%08x/%08x/data/", + File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(_titleID >> 32), (u32)_titleID); + + return path; } std::string GetTMDFileName(u64 _titleID) @@ -30,9 +34,11 @@ std::string GetTMDFileName(u64 _titleID) } std::string GetTitleContentPath(u64 _titleID) { - return StringFromFormat("%stitle/%08x/%08x/content/", - File::GetUserPath(D_WIIUSER_IDX).c_str(), - (u32)(_titleID >> 32), (u32)_titleID); + char ContentPath[1024]; + sprintf(ContentPath, "%stitle/%08x/%08x/content/", + File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(_titleID >> 32), (u32)_titleID); + + return ContentPath; } bool CheckTitleTMD(u64 _titleID) -- cgit v1.2.3