THRIFT-1863 cocoa: [TBinaryProtocol readMessageBeginReturnName:type:sequenceID] returns incorrect message type
Patch: Kevin Li
diff --git a/lib/cocoa/src/protocol/TBinaryProtocol.m b/lib/cocoa/src/protocol/TBinaryProtocol.m
index f269aaa..bee616e 100644
--- a/lib/cocoa/src/protocol/TBinaryProtocol.m
+++ b/lib/cocoa/src/protocol/TBinaryProtocol.m
@@ -118,7 +118,7 @@
                                  reason: @"Bad version in readMessageBegin"];
     }
     if (type != NULL) {
-      *type = version & 0x00FF;
+      *type = size & 0x00FF;
     }
     NSString * messageName = [self readString];
     if (name != NULL) {