"size" & "buff" Undefined

Issue #16 resolved
Yoowah created an issue

Was trying to compile this under VS2017

gw2hook.cpp

Line 252

#ifdef ARCH_64BIT
#else
    uintptr_t *buff = (uintptr_t*)ctx->EDI;
    uint32_t size = *(uint32_t*)(ctx->EBP + 0xc);
#endif

    Gw2Hooks* list = get_hook_list();
    if (list->PacketRecvHook) list->PacketRecvHook(size, buff);
}

Line 264

#ifdef ARCH_64BIT

#else
    uintptr_t *buff = (uintptr_t*)ctx->EBX;
    uint32_t size = ctx->EDI;
#endif

    Gw2Hooks* list = get_hook_list();
    if (list->PacketSendHook) list->PacketSendHook(size, buff);
}

Moving the two lines of codes into else fix the issue.

Comments (2)

  1. Log in to comment