The behaviour of right-shifting a negative signed integer is implementation dependent,
as far as I remember. You should replace long
by unsigned long
or uint64_t
.
reverse a pointer read from binary file
-
06-10-2022 - |
Pregunta
I'm trying to reverse some pointers that were read from a binary encoded file.
When I try to reverse the pointer 0xfffe0024540 stored in big endian format, I get 0xffffffffe0024540
The pointer is stored in the file in the format: 0000 ff0f 02e0 4045
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow