1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:27:45 +00:00

LibCoreDump: Make narrowing uint64_t => FlatPtr conversion explicit

This fixes a build issue on Clang which returns an error if narrowing is
performed in a list-initialization.
This commit is contained in:
Daniel Bertalan 2021-07-23 09:23:17 +02:00 committed by Andreas Kling
parent 5f2f460cc8
commit 9265f24816

View file

@ -265,7 +265,7 @@ const Reader::LibraryData* Reader::library_containing(FlatPtr address) const
if (file_or_error.is_error()) if (file_or_error.is_error())
return {}; return {};
auto image = ELF::Image(file_or_error.value()->bytes()); auto image = ELF::Image(file_or_error.value()->bytes());
cached_libs.set(path, make<LibraryData>(name, region->region_start, file_or_error.release_value(), move(image))); cached_libs.set(path, make<LibraryData>(name, (FlatPtr)region->region_start, file_or_error.release_value(), move(image)));
} }
auto lib_data = cached_libs.get(path).value(); auto lib_data = cached_libs.get(path).value();