Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
little-endian h4x
#1
let's say you have an array of two chars [lua]char * poop = new char[2]();[/lua]

instead of writing to memory twice to write to both char's, you can do an epix h4x and only write to memory once!

[lua]*(short *)poop = 'h'|('i' << 8);[/lua]

now poop contains:

[lua]{'h','i'}[/lua] in that order.



u liek
Reply
#2
These 'H4x' threads keep confusing me more and more.

But they seem to work from what I see.
[Image: chaosthegreat.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)