diff --git a/src/dynafunc_maker.cpp b/src/dynafunc_maker.cpp index b43f6ce..a7c67e8 100644 --- a/src/dynafunc_maker.cpp +++ b/src/dynafunc_maker.cpp @@ -42,10 +42,11 @@ namespace wren { extern "C" const char g_dynafunc_end[]; const unsigned int g_dynafunc_len = g_dynafunc_end - g_dynafunc; - const constexpr unsigned int g_dynafunc_ptr1_size = ASM_PTR_SIZE; - const constexpr unsigned int g_dynafunc_ptr2_size = ASM_FUNC_PTR_SIZE; - const constexpr unsigned char g_dynafunc_ptr1[] = {0xef, 0xbe, 0xad, 0xde, 0xef, 0xbe, 0xad, 0xde}; - const constexpr unsigned char g_dynafunc_ptr2[] = {0x0d, 0xf0, 0xdd, 0xe0, 0xfe, 0x0f, 0xdc, 0xba}; + constexpr unsigned int g_dynafunc_ptr1_size = ASM_PTR_SIZE; + constexpr unsigned int g_dynafunc_ptr2_size = ASM_FUNC_PTR_SIZE; + constexpr unsigned char g_dynafunc_ptr1[] = {0xef, 0xbe, 0xad, 0xde, 0xef, 0xbe, 0xad, 0xde}; + constexpr unsigned char g_dynafunc_ptr2[] = {0x0d, 0xf0, 0xdd, 0xe0, 0xfe, 0x0f, 0xdc, 0xba}; + static_assert(sizeof(g_dynafunc_ptr1) / sizeof(g_dynafunc_ptr1[0]) >= g_dynafunc_ptr1_size); static_assert(sizeof(g_dynafunc_ptr2) / sizeof(g_dynafunc_ptr2[0]) >= g_dynafunc_ptr2_size);