Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    422055

Untitled

Sign in to follow this  

73 views

Ugh @ Lua. Well, ugh in general.

PC is little endian. Wii is big endian. A compiled lua script is stored in the byt order of the machine it was compiled on. Begin to see the problem here?
On the plus side, Lua is remarkably safe, it does a check on various things like the version (obviously), size of the types it uses, and the byte order when loading a compiled lua chunk. So at least I got a helpful error message from it instead of a random crash or gibberish data.

End result; I spent a couple of hours today making luac swap the byte order of stuff it outputs. It was surprisingly simple actually, most of the time was spent testing it and fixing stupid bugs like me closing the Lua state then trying to use it, and I thought the crash was something wrong with the Lua source I changed.

*sigh*
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now