mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[sim] HAL_GetControlWord: Fully zero output (#2873)
This ensures the padding is zero'ed. We already do this on Athena, we just didn't in sim.
This commit is contained in:
@@ -172,7 +172,6 @@ Java_edu_wpi_first_hal_HAL_nativeGetControlWord
|
||||
static_assert(sizeof(HAL_ControlWord) == sizeof(jint),
|
||||
"Java int must match the size of control word");
|
||||
HAL_ControlWord controlWord;
|
||||
std::memset(&controlWord, 0, sizeof(HAL_ControlWord));
|
||||
HAL_GetControlWord(&controlWord);
|
||||
jint retVal = 0;
|
||||
std::memcpy(&retVal, &controlWord, sizeof(HAL_ControlWord));
|
||||
|
||||
Reference in New Issue
Block a user