我猜它无处可去,一个空指针或其他东西,但我事先正在检查
这两个片段都崩溃了:
//Snippet 1
DWORD *address = (DWORD*)(base + 0x54);
if (address)
address = (DWORD*)(*address + 0xC);
if (address)
address = (DWORD*)(*address + 0x8); //crashes here
//Snippet 2
DWORD address = *(DWORD*)(base + 0x54);
if (address)
address = *(DWORD*)(address + 0xC);
if (address)
address = *(DWORD*)(address + 0x8); //crashes here
我做错了吗? 提前致谢
答案 0 :(得分:1)
访问违规!
你正在触摸可能禁止你的程序的某些内存部分。取消引用指向未知位置的指针是未定义的行为。