diff --git a/Source/Network/Connection/Connection.cpp b/Source/Network/Connection/Connection.cpp index 7c485eef3..a3db661b9 100644 --- a/Source/Network/Connection/Connection.cpp +++ b/Source/Network/Connection/Connection.cpp @@ -359,11 +359,8 @@ int PacketCodecStub(void* data, std::size_t size, std::size_t* outSize, int) { // OFFSET: 0x00C7E030 // FUNCTION: fn_20412 const unsigned char* __stdcall FindCodeMarker(const unsigned char* code) { - if (std::memcmp(code, g_codeMarker, sizeof(g_codeMarker)) != 0) { - do { - ++code; - } while (*reinterpret_cast(code) != *reinterpret_cast(g_codeMarker) || - *reinterpret_cast(code + 4) != *reinterpret_cast(g_codeMarker + 4)); + while (std::memcmp(code, g_codeMarker, sizeof(g_codeMarker)) != 0) { + ++code; } return code; }