Merge pull request #2602 from lioncash/cast

service/acc: Silence truncation warnings
This commit is contained in:
bunnei 2019-06-21 15:27:25 -04:00 committed by GitHub
commit 69e490b303
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ private:
LOG_WARNING(Service_ACC,
"Failed to load user provided image! Falling back to built-in backup...");
ctx.WriteBuffer(Core::Constants::ACCOUNT_BACKUP_JPEG);
rb.Push<u32>(Core::Constants::ACCOUNT_BACKUP_JPEG.size());
rb.Push(SanitizeJPEGSize(Core::Constants::ACCOUNT_BACKUP_JPEG.size()));
return;
}
@ -116,9 +116,9 @@ private:
if (!image.IsOpen()) {
LOG_WARNING(Service_ACC,
"Failed to load user provided image! Falling back to built-in backup...");
rb.Push<u32>(Core::Constants::ACCOUNT_BACKUP_JPEG.size());
rb.Push(SanitizeJPEGSize(Core::Constants::ACCOUNT_BACKUP_JPEG.size()));
} else {
rb.Push<u32>(SanitizeJPEGSize(image.GetSize()));
rb.Push(SanitizeJPEGSize(image.GetSize()));
}
}