Fix compilation on 32 bit android

This commit is contained in:
Damien Mabin 2023-11-15 13:28:37 +02:00 committed by GitHub
parent 2f2f9939db
commit 37f886dba4
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 end_addr;
#if defined(__LP64__)
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, ' ' );
if( !first_space ) continue;
char* perm = first_space + 1;