Skip to content

Commit e2cbc7b

Browse files
Fix compilation warning -Wshift-count-overflow (#134)
Fix issue #129 Signed-off-by: Lucas Dietrich <[email protected]>
1 parent 06e6e16 commit e2cbc7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp2518fd_can.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ byte mcp2518fd::checkError(uint8_t* err_ptr) {
20662066
byte mcp2518fd::mcp2518fd_readMsgBufID(volatile byte *len, volatile byte *buf) {
20672067
mcp2518fd_ReceiveMessageGet(APP_RX_FIFO, &rxObj, rxd, MAX_DATA_BYTES);
20682068
ext_flg = rxObj.bF.ctrl.IDE;
2069-
can_id = ext_flg? (rxObj.bF.id.EID | (rxObj.bF.id.SID << 18))
2069+
can_id = ext_flg? (rxObj.bF.id.EID | ((uint32_t) rxObj.bF.id.SID << 18))
20702070
: rxObj.bF.id.SID;
20712071
rtr = rxObj.bF.ctrl.RTR;
20722072
uint8_t n = DRV_CANFDSPI_DlcToDataBytes((CAN_DLC)rxObj.bF.ctrl.DLC);

0 commit comments

Comments
 (0)