diff options
author | 2019-06-04 15:06:08 +0000 | |
---|---|---|
committer | 2019-06-04 15:06:08 +0000 | |
commit | 9fe4ba7a435725eda5d7f12d804633ff858ebb71 (patch) | |
tree | 69b4ef4ac5e4d9bbe9e0f396716113e6c54eeed2 | |
parent | 9e2457622abb8611876185f09cb79f5c3c2f4711 (diff) | |
parent | 7f08644bd7acc27d896bf7380d26e89ab7dfd381 (diff) |
Merge "Fix atoi build errors" into qt-dev
-rw-r--r-- | cmds/idmap2/idmap2/Scan.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmds/idmap2/idmap2/Scan.cpp b/cmds/idmap2/idmap2/Scan.cpp index 21c6bd280064..cfac5f31e2e6 100644 --- a/cmds/idmap2/idmap2/Scan.cpp +++ b/cmds/idmap2/idmap2/Scan.cpp @@ -69,7 +69,10 @@ struct InputOverlay { bool VendorIsQOrLater() { constexpr int kQSdkVersion = 29; - int version = std::atoi(android::base::GetProperty("ro.vndk.version", "29").data()); + constexpr int kBase = 10; + std::string version_prop = android::base::GetProperty("ro.vndk.version", "29"); + int version = strtol(version_prop.data(), nullptr, kBase); + // If the string cannot be parsed, it is a development sdk codename. return version >= kQSdkVersion || version == 0; } |