aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZeex <zeex@rocketmail.com>2018-09-08 00:05:36 +0600
committerZeex <zeex@rocketmail.com>2018-09-08 00:05:38 +0600
commitb58b8370baf493658e4d9ef72c9a591b51aa45b7 (patch)
treec54ab0e3534d20e53702ee69547fa63a1da305ae /tests
parent3a61f8f2700862fba0eceeb51381f006816bad5e (diff)
downloadsubhook-b58b8370baf493658e4d9ef72c9a591b51aa45b7.zip
subhook-b58b8370baf493658e4d9ef72c9a591b51aa45b7.tar.gz
subhook-b58b8370baf493658e4d9ef72c9a591b51aa45b7.tar.bz2
Fix compile errors and remove uses of nullptr
Diffstat (limited to 'tests')
-rw-r--r--tests/test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test.cpp b/tests/test.cpp
index 5536a36..7ba167a 100644
--- a/tests/test.cpp
+++ b/tests/test.cpp
@@ -1,3 +1,4 @@
+#include <cstdlib>
#include <iostream>
#include <subhook.h>
@@ -15,7 +16,7 @@ typedef void (*foo_func_t)();
#endif
extern "C" void FOO_CALL foo();
-foo_func_t foo_tr = nullptr;
+foo_func_t foo_tr = 0;
void foo_hooked() {
std::cout << "foo_hooked() called" << std::endl;;
@@ -66,7 +67,7 @@ int main() {
return EXIT_FAILURE;
}
foo_tr = (foo_func_t)foo_hook_tr.GetTrampoline();
- if (foo_tr == nullptr) {
+ if (foo_tr == 0) {
std::cout << "Failed to build trampoline" << std::endl;
return EXIT_FAILURE;
}