[XAM] XamReadTileToTexture: tile_id safety check

This commit is contained in:
Gliniak 2021-05-18 20:55:33 +02:00 committed by Rick Gibbed
parent 29f28b8b60
commit 29f7987401
1 changed files with 3 additions and 0 deletions

View File

@ -737,6 +737,9 @@ dword_result_t XamReadTileToTexture(dword_t unknown, dword_t title_id,
lpvoid_t buffer_ptr, dword_t stride, lpvoid_t buffer_ptr, dword_t stride,
dword_t height, dword_t overlapped_ptr) { dword_t height, dword_t overlapped_ptr) {
// TODO(gibbed): unknown=0,2,3,9 // TODO(gibbed): unknown=0,2,3,9
if (!tile_id) {
return X_ERROR_INVALID_PARAMETER;
}
size_t size = size_t(stride) * size_t(height); size_t size = size_t(stride) * size_t(height);
std::memset(buffer_ptr, 0xFF, size); std::memset(buffer_ptr, 0xFF, size);