summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2021-11-05 20:52:11 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-10 14:42:49 +0100
commit6c6381408fb4a44187978c75dc19ea831da20f1e (patch)
treec63ce2f6bc65213c389490046385c95fe59675af
parentfc6f26515525b2ac032dc4b2804f9dd24892451b (diff)
downloadserenity-6c6381408fb4a44187978c75dc19ea831da20f1e.zip
Emulator: Use existing queried library name in load check
We already asked the region about what its library name is, and we also use that value when maybe constructing a path, so let's make the check use that as well.
-rw-r--r--Userland/DevTools/UserspaceEmulator/Emulator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.cpp b/Userland/DevTools/UserspaceEmulator/Emulator.cpp
index 2add55b23f..394c56e338 100644
--- a/Userland/DevTools/UserspaceEmulator/Emulator.cpp
+++ b/Userland/DevTools/UserspaceEmulator/Emulator.cpp
@@ -395,7 +395,7 @@ MmapRegion const* Emulator::load_library_from_address(FlatPtr address)
return {};
String lib_path = lib_name;
- if (region->name().contains(".so"))
+ if (lib_name.ends_with(".so"))
lib_path = String::formatted("/usr/lib/{}", lib_path);
if (!m_dynamic_library_cache.contains(lib_path)) {