Potential Memory Corruption in Release Build (#3559)
* Potential Memory Corruption in Release Build Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * @lumberyard-employee-dm suggested code Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * warnings as errors found in VS2022 Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * simplifying some strucutres used and fixing a bug Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * some unused fixes for VS2022 Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fix for other platforms Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixes check used in unit tests to be case-insensitive fixes memory leaks/invalid memory operations in AWSCore tests Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -1650,10 +1650,10 @@ bool CSystem::HandleMessage([[maybe_unused]] HWND hWnd, UINT uMsg, WPARAM wParam
|
||||
AZStd::array<BYTE, sizeof(RAWINPUT)> rawInputBytesArray;
|
||||
LPBYTE rawInputBytes = rawInputBytesArray.data();
|
||||
|
||||
const UINT bytesCopied = GetRawInputData((HRAWINPUT)lParam, RID_INPUT, rawInputBytes, &rawInputSize, rawInputHeaderSize);
|
||||
[[maybe_unused]] const UINT bytesCopied = GetRawInputData((HRAWINPUT)lParam, RID_INPUT, rawInputBytes, &rawInputSize, rawInputHeaderSize);
|
||||
CRY_ASSERT(bytesCopied == rawInputSize);
|
||||
|
||||
RAWINPUT* rawInput = (RAWINPUT*)rawInputBytes;
|
||||
[[maybe_unused]] RAWINPUT* rawInput = (RAWINPUT*)rawInputBytes;
|
||||
CRY_ASSERT(rawInput);
|
||||
|
||||
AzFramework::RawInputNotificationBusWindows::Broadcast(&AzFramework::RawInputNotificationsWindows::OnRawInputEvent, *rawInput);
|
||||
|
||||
Reference in New Issue
Block a user