aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/module.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-14 22:36:20 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-14 22:38:00 +0300
commiteac7246943bfaabdafcff7506d479f4cbe1ff0cc (patch)
treed7345a17e10f6b162923bdb89b31dc2298d87d3f /src/module.cpp
parentadd SafeInt as a submodule (diff)
downloadwinapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.tar.gz
winapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.zip
fix SafeInt usage
Diffstat (limited to 'src/module.cpp')
-rw-r--r--src/module.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/module.cpp b/src/module.cpp
index 0bf9329..9f12599 100644
--- a/src/module.cpp
+++ b/src/module.cpp
@@ -5,7 +5,7 @@
#include "pdb/all.hpp"
-#include <safeint.h>
+#include <SafeInt.hpp>
#include <cstring>
#include <sstream>
@@ -33,7 +33,7 @@ Address Module::translate_offline_address(Address offline) const {
throw std::range_error{invalid_offline_address(offline)};
const auto offset = offline - get_offline_base();
auto online = offset;
- if (!msl::utilities::SafeAdd(online, get_online_base(), online))
+ if (!SafeAdd(online, get_online_base(), online))
throw std::range_error{invalid_offline_address(offline)};
return online;
}
@@ -43,7 +43,7 @@ Address Module::translate_online_address(Address online) const {
throw std::range_error{invalid_online_address(online)};
const auto offset = online - get_online_base();
auto offline = offset;
- if (!msl::utilities::SafeAdd(offline, get_offline_base(), offline))
+ if (!SafeAdd(offline, get_offline_base(), offline))
throw std::range_error{invalid_online_address(offline)};
return offline;
}