adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] PPC/Sparc input problem fixed


From: Kai Sterker
Subject: [Adonthell-devel] PPC/Sparc input problem fixed
Date: Fri, 17 Jan 2003 21:07:28 +0100

Well, this whole thing has finally gotten on my nerves, so I took the
time to track the error down.

Text input works properly on the PowerPC, and I imagine it does as well
on Sparc. Seems it was an endianess issue after all, although hard to
spot.

Thing was the following, we had a 32 bit int which we cast to char*. On
little-endian machines you have something like 0x41000000, which means
you get "A\0" after the conversion. No problem. On a big-endian box you
have 0x00000041, so after the conversion you get "A" and whatever
follows on the stack. Not good ;).

Now that everything works fine, I'll see that I can make that MacOS X
binary. Of course, compiling from source is no trouble either.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]