mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 18:15:58 +00:00
![]() Previously, `load_from_memory()` just took a raw pointer to the data, and then manually calculated offsets from that pointer. Instead, let's use the MappedFile we already have, to stream in the data, to make things a bit safer. We also now check that the entire file's data was read, since if there was data left over, then either the file is bad or we've done something wrong. I've moved the code directly into `try_load_from_mapped_file()` since `load_from_memory()` was only called from there. The extra indirection wasn't adding anything. |
||
---|---|---|
.. | ||
Applets | ||
Applications | ||
BuggieBox | ||
Demos | ||
DevTools | ||
DynamicLoader | ||
Games | ||
Libraries | ||
Services | ||
Shell | ||
Utilities | ||
CMakeLists.txt |