Re: int and short int on intel
Re: int and short int on intel
- Subject: Re: int and short int on intel
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 11 Jan 2007 19:17:34 -0700
On Jan 11, 2007, at 7:12 PM, Jonathan Fewtrell wrote:
The problem I am having is that, on intel machines, if scale
exceeds a certain value (which I think is 32k), scale1 or scale2 is
set to a different value. It appears that either FF FF or 00 01
gets substituted for the first two bytes. It seems to be something
to do with 2 byte and 4 byte ints.
I get a compiler warning that there is more than one method called -
scale (apart from the ones in JF1 and JF2). The other is in
NSDecimalNumber and is a short int. I assume this is leading to the
problem, but I don't see why.
The maximum number that can fit into a short int is 2^15-1, or 32767.
So you're probably overrunning a buffer with that short int.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden