diff --git a/libreborn/include/libreborn/patch.h b/libreborn/include/libreborn/patch.h index c7cb52d3cd..3583c7ecbd 100644 --- a/libreborn/include/libreborn/patch.h +++ b/libreborn/include/libreborn/patch.h @@ -1,11 +1,10 @@ #pragma once -#ifdef __cplusplus - // Patching Functions -#ifdef REBORN_HAS_PATCH_CODE +#if defined(REBORN_HAS_PATCH_CODE) && defined(__cplusplus) +// Init void reborn_init_patch(); // Replace Call Located At start With A Call To target @@ -18,7 +17,7 @@ template static void _only_call_once() { static bool _has_run = false; if (_has_run) { - IMPOSSIBLE(); + ERR("\"Fancy\" overwrite*() Functions Can Only Be Called Once"); } _has_run = true; } @@ -132,5 +131,3 @@ void _patch_vtable(const char *file, int line, start_t *start, start_t target) { ) #endif - -#endif