summaryrefslogtreecommitdiff
path: root/gnss
diff options
context:
space:
mode:
authorWei Chen <weic@codeaurora.org>2019-11-01 11:31:41 -0700
committerWei Chen <weic@codeaurora.org>2019-11-07 11:58:15 -0800
commit569517b808735f514f6d2e9fadb7922af4610960 (patch)
tree56bf33113e17959e13dabdfc20b531f325e369e1 /gnss
parent6bfa690c483ed3f58a28062dbafc2843e0502a52 (diff)
downloadgps-569517b808735f514f6d2e9fadb7922af4610960.tar.gz
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
Diffstat (limited to 'gnss')
-rw-r--r--gnss/GnssAdapter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index dee969a..f7e1c0d 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -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));
}
}
}