]> git.tdb.fi Git - builder.git/commitdiff
Fix bit shifts to be 64-bit
authorMikko Rasa <tdb@tdb.fi>
Sat, 24 Dec 2022 12:12:18 +0000 (14:12 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 24 Dec 2022 12:12:18 +0000 (14:12 +0200)
source/androidtools.cpp

index c5aab653c51fe3eec613412e1328daead5a2c3a8..0073dff18e7624109e44d0a7d10482f530d5451e 100644 (file)
@@ -61,13 +61,13 @@ AndroidDevKit::AndroidDevKit(Builder &b, const string &type, const FS::Path &def
                if(api>63)
                        builder.get_logger().log("problems", "API level %d is too high", api);
                else
-                       supported_api_levels |= 1<<api;
+                       supported_api_levels |= static_cast<uint64_t>(1)<<api;
        }
 }
 
 void AndroidDevKit::select_api_level(unsigned api)
 {
-       if(!(supported_api_levels&(1<<api)))
+       if(!((supported_api_levels>>api)&1))
                throw invalid_argument("AndroidDevKit::select_api_level");
 
        init_api_level(api);