Mike wrote:

char Item1[4]; char Item2[2]; char Item3[4];

char* MyArray[3] ={Item1,Item2,Item3};

Main()
{
    MyFunction(MyArray[1],MyArray[2]);
}

MyFunction(char* val1, char* val2)
{
    if(*(UInt*)Val1 != *(UInt*)Val2)
    {
      do something;
    }
}

This looks an alignment issue. Integer access has to be integers that are correctly aligned in memory. If the strings pointed to by MyArray are not aligned with the sizeof(UInt) then this would crash you. What size ints are you using? It looks like it should work using UInt16s, but UInt32 would almost certainly wreck this.


-matt

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to