mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 22:05:47 +00:00
service/acc: Silence truncation warnings
The sanitizing function ensures that the returned type is always the correct type. This eliminates warnings without extra casts.
This commit is contained in:
parent
71ec79857a
commit
ee7b682ee0
1 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ private:
|
||||||
LOG_WARNING(Service_ACC,
|
LOG_WARNING(Service_ACC,
|
||||||
"Failed to load user provided image! Falling back to built-in backup...");
|
"Failed to load user provided image! Falling back to built-in backup...");
|
||||||
ctx.WriteBuffer(Core::Constants::ACCOUNT_BACKUP_JPEG);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,9 +116,9 @@ private:
|
||||||
if (!image.IsOpen()) {
|
if (!image.IsOpen()) {
|
||||||
LOG_WARNING(Service_ACC,
|
LOG_WARNING(Service_ACC,
|
||||||
"Failed to load user provided image! Falling back to built-in backup...");
|
"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 {
|
} else {
|
||||||
rb.Push<u32>(SanitizeJPEGSize(image.GetSize()));
|
rb.Push(SanitizeJPEGSize(image.GetSize()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue