diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-14 22:36:20 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-14 22:38:00 +0300 |
commit | eac7246943bfaabdafcff7506d479f4cbe1ff0cc (patch) | |
tree | d7345a17e10f6b162923bdb89b31dc2298d87d3f /src/utils | |
parent | add SafeInt as a submodule (diff) | |
download | winapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.tar.gz winapi-debug-eac7246943bfaabdafcff7506d479f4cbe1ff0cc.zip |
fix SafeInt usage
Diffstat (limited to '')
-rw-r--r-- | src/utils/file.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/file.cpp b/src/utils/file.cpp index c25307a..85af444 100644 --- a/src/utils/file.cpp +++ b/src/utils/file.cpp @@ -5,8 +5,9 @@ #include "pdb/all.hpp" +#include <SafeInt.hpp> + #include <Windows.h> -#include <safeint.h> #include <cstddef> #include <stdexcept> @@ -34,7 +35,7 @@ std::size_t get_size(const std::string& path) { std::size_t result = 0; - if (!msl::utilities::SafeCast(size.QuadPart, result)) + if (!SafeCast(size.QuadPart, result)) throw std::runtime_error{"invalid file size"}; return result; |