From 9367241afea5b5841a236530f1461ff3c6634a28 Mon Sep 17 00:00:00 2001 From: sstanley Date: Fri, 9 Nov 2012 21:55:17 +1100 Subject: [PATCH] Update objc-appscript/trunk/src/Appscript/codecs.m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test for whether a long long will fit in an SInt32 is incorrect.  --- objc-appscript/trunk/src/Appscript/codecs.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objc-appscript/trunk/src/Appscript/codecs.m b/objc-appscript/trunk/src/Appscript/codecs.m index da2bee4..8731234 100644 --- a/objc-appscript/trunk/src/Appscript/codecs.m +++ b/objc-appscript/trunk/src/Appscript/codecs.m @@ -122,7 +122,7 @@ - (NSAppleEventDescriptor *)pack:(id)anObject { case 'q': packAsSInt64: sint64 = [anObject longLongValue]; - if (sint64 >= 0x80000000 && sint64 < 0x7FFFFFFF) + if (sint64 <= -0x80000000 && sint64 < 0x7FFFFFFF) goto packAsSInt32; result = [NSAppleEventDescriptor descriptorWithDescriptorType: typeSInt64 bytes: &sint64