Copied the code from stack overflow without thinking about it. The first byte in little endian order should always be LSB so I construct a more contrived example (0xFFFF0000) which should make it easier to detect what the first byte is considered on the machine. If it's 0 then the LSB is the first byte hence little endian, otherwise it's big endian. On a greater note: Don't never copy no code from stack overflow, bro. I went up there at 11 o'clock last night trynna get me some code. Bro, I copied that shit, woke up, my motherfucking LITTLE_ENDIAN detection don't work. Explain, bro.