Its overflowing because, as Ben pointed out, TimeToAscii requires
timeStringLenght characters not 6.  You may think it uses only 5 characters
but you never know what the routine is actually doing.  My bet is the
routine creates the whole string and crops off the parts you specified you
didn't want such as am/pm or seconds.
Change Char strTime[6];
to
Char strTime[timeStringLenght];
and I'll bet the bus error will stop.

----- Original Message ----- 
From: "David Beers" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 6:28 PM
Subject: Re: bus error when table custom draw routine is modularized


> Thanks for the quick reply, Ben--and the pointer about using the register
> view.  That's a new one for me. Sure enough, I can see the A6 register
being
> overwritten when I step over that call.  I'm not sure why my 6 byte buffer
> was overflowing since there were only 5 bytes (including the null) in the
> string but when I "do the right thing" and use timeStringLength as the
> buffer size, all is well.
>
> Thanks big guy! :)
> David
>


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

Reply via email to