--On 17 July 2001 20:07 -0400 Jatin Sethi <[EMAIL PROTECTED]> wrote:
> I am getting a "Bus Error" in the following statement:
>
> StrIToA(dispLength, (Int32) extendedDataLength);
>
> The prototype for StrIToA is:
> Char * StrIToA(Char *s, Int32 i)
>
> The variables have been defined as:
> CharPtr dispLength = "";
> int extendedDataLength;
>
> What is a "Bus error"? Does anyone have any idea why would this cause a
> "Bus Error"?
You're overflowing dispLength, as it's set to be of length 1. StrIToA
doesn't magically resize string to fit the result, so instead you have to
provide sufficient space for the conversion to succeed, and then, if
necessary, shrink it.
IM :-)
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/