我正在尝试使用 memcpy 但它给了我一个
运行时错误:分段错误(核心转储)
和编译器警告:警告:从不同大小的整数转换为指针 [-Wint-to-pointer-cast]
这是代码
unsigned char JMP[6] = {0xE9, 0x90, 0x90, 0x90, 0x90, 0xC3};
unsigned long JMPSize = ...;
//copy jump size to jump instruction at second byte (this is where i get the error)
memcpy((uint8_t*)JMP[1],(void*)JMPSize, 4);