Fixed content path generation

This commit is contained in:
Adubbz 2019-07-27 23:43:54 +10:00
parent ebc619fe56
commit 7a81ca9441
2 changed files with 3 additions and 3 deletions

View file

@ -272,7 +272,7 @@ namespace sts::ncm {
std::abort(); 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; return ResultSuccess;
} }

View file

@ -20,13 +20,13 @@ namespace sts::ncm {
void GetStringFromContentId(char* out, ContentId content_id) { void GetStringFromContentId(char* out, ContentId content_id) {
for (size_t i = 0; i < sizeof(ContentId); i++) { 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) { void GetStringFromPlaceHolderId(char* out, PlaceHolderId placeholder_id) {
for (size_t i = 0; i < sizeof(PlaceHolderId); i++) { 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]);
} }
} }