diff --git a/wpilibc/athena/src/I2C.cpp b/wpilibc/athena/src/I2C.cpp index 0f010f5502..5ea58b45ee 100644 --- a/wpilibc/athena/src/I2C.cpp +++ b/wpilibc/athena/src/I2C.cpp @@ -122,8 +122,8 @@ bool I2C::Read(int registerAddress, int count, uint8_t* buffer) { wpi_setWPIErrorWithContext(NullParameter, "buffer"); return true; } - return Transaction(reinterpret_cast(®isterAddress), - sizeof(registerAddress), buffer, count); + uint8_t regAddr = registerAddress; + return Transaction(®Addr, sizeof(regAddr), buffer, count); } /**