aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/call_stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/call_stack.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/call_stack.cpp b/src/call_stack.cpp
index aec50de..183f14a 100644
--- a/src/call_stack.cpp
+++ b/src/call_stack.cpp
@@ -5,8 +5,6 @@
#include <pdb/all.hpp>
-#include <SafeInt.hpp>
-
#include <windows.h>
#include <algorithm>
@@ -41,8 +39,9 @@ std::string offset_from(const std::string& thing, Address offset) {
std::string offset_from_module(const ModuleInfo& module, Address addr) {
Address offset = 0;
- if (!SafeSubtract(addr, module.get_offline_base(), offset))
+ if (addr < module.get_offline_base())
throw std::range_error{"invalid address in module"};
+ offset = addr - module.get_offline_base();
return offset_from(module.get_name(), offset);
}