From 7a81ca94415b1c318c79254651d2451ac6393733 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 27 Jul 2019 23:43:54 +1000 Subject: [PATCH] Fixed content path generation --- stratosphere/ncm/source/ncm_fs.cpp | 2 +- stratosphere/ncm/source/ncm_utils.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stratosphere/ncm/source/ncm_fs.cpp b/stratosphere/ncm/source/ncm_fs.cpp index 1d1a38e20..3fecec315 100644 --- a/stratosphere/ncm/source/ncm_fs.cpp +++ b/stratosphere/ncm/source/ncm_fs.cpp @@ -272,7 +272,7 @@ namespace sts::ncm { std::abort(); } - snprintf(out_common_path, out_len, "%s:/%s", common_mount_name, translated_path); + snprintf(out_common_path, out_len, "%s:%s", common_mount_name, translated_path); return ResultSuccess; } diff --git a/stratosphere/ncm/source/ncm_utils.cpp b/stratosphere/ncm/source/ncm_utils.cpp index 8be26bf71..a490f6a0f 100644 --- a/stratosphere/ncm/source/ncm_utils.cpp +++ b/stratosphere/ncm/source/ncm_utils.cpp @@ -20,13 +20,13 @@ namespace sts::ncm { void GetStringFromContentId(char* out, ContentId content_id) { for (size_t i = 0; i < sizeof(ContentId); i++) { - snprintf(out+i, 3, "%02x", content_id.uuid[i]); + snprintf(out+i*2, 3, "%02x", content_id.uuid[i]); } } void GetStringFromPlaceHolderId(char* out, PlaceHolderId placeholder_id) { for (size_t i = 0; i < sizeof(PlaceHolderId); i++) { - snprintf(out+i, 3, "%02x", placeholder_id.uuid[i]); + snprintf(out+i*2, 3, "%02x", placeholder_id.uuid[i]); } }