GPS HW module: fix << overflow issue

Fix shift overflow when the number of bits shifted can exceed 31 bits

Change-Id: Ib4334fd9b3bf574b8d8143a5f706ca9e963a6053
CRs-fixed: 2557855
This commit is contained in:
Wei Chen 2019-11-01 11:31:41 -07:00
parent 6bfa690c48
commit 569517b808

View file

@ -1518,7 +1518,7 @@ GnssAdapter::convertToGnssSvIdConfig(
LOC_LOGe("Invalid sv id %d for sv type %d",
source.svId, source.constellation);
} else {
*svMaskPtr |= (1 << (source.svId - initialSvId));
*svMaskPtr |= (1ULL << (source.svId - initialSvId));
}
}
}