Merge pull request #660 from sistr22/patch-android-compilation

Fix compilation on 32 bit android
This commit is contained in:
Bartosz Taudul 2023-11-15 12:35:44 +01:00 committed by GitHub
commit c79f6128bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,11 @@ static std::vector<MappingInfo> ParseMappings()
{ {
uintptr_t start_addr; uintptr_t start_addr;
uintptr_t end_addr; uintptr_t end_addr;
#if defined(__LP64__)
if( sscanf( line, "%lx-%lx", &start_addr, &end_addr ) != 2 ) continue; if( sscanf( line, "%lx-%lx", &start_addr, &end_addr ) != 2 ) continue;
#else
if (sscanf( line, "%dx-%dx", &start_addr, &end_addr ) != 2 ) continue;
#endif
char* first_space = strchr( line, ' ' ); char* first_space = strchr( line, ' ' );
if( !first_space ) continue; if( !first_space ) continue;
char* perm = first_space + 1; char* perm = first_space + 1;