Skip to content

Commit b032373

Browse files
committed
fix: error to stderr stream before terminate
1 parent 99b74db commit b032373

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Callback* PolyHookPlugin::hookDetour(void* pFunc, DataType returnType, std::span
7373

7474
auto error = callback->getError();
7575
if (!error.empty()) {
76-
std::puts(error.data());
76+
std::fputs(error.data(), stderr);
7777
std::terminate();
7878
}
7979

@@ -110,7 +110,7 @@ Callback* PolyHookPlugin::hookVirtual(void* pClass, int index, DataType returnTy
110110

111111
auto error = callback->getError();
112112
if (!error.empty()) {
113-
std::puts(error.data());
113+
std::fputs(error.data(), stderr);
114114
std::terminate();
115115
}
116116

0 commit comments

Comments
 (0)