David Webb <[EMAIL PROTECTED]> wrote:
> #define MAX_DOWNLOAD_SIZE 46000
[...]
> StrPrintF(msglabel, "%u", MAX_DOWNLOAD_SIZE);
When ints are 16 bits, the integer constant 46000 has type _long_ int,
so amusingly enough is not what StrPrintF is expecting when you say
"%u". Even more amusingly, 0xb3b0 has type unsigned int under similar
circumstances, so would work well with "%u". As Jan suggested, putting
explicit suffices on your large integer constants is a good idea.
The relevant part of the C99 standard is section 6.4.4.1.
John
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/