From d593795f9a2fb4b6c17be103faad36deee338b4f Mon Sep 17 00:00:00 2001 From: Xiaofeng Date: Tue, 3 Apr 2018 18:08:44 +0800 Subject: [PATCH] fix using CFSwapInt32LittleToHost to convert arg of uint32_t --- CoreBitcoin/BTCScript.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CoreBitcoin/BTCScript.m b/CoreBitcoin/BTCScript.m index 772519f1..46d7ceca 100644 --- a/CoreBitcoin/BTCScript.m +++ b/CoreBitcoin/BTCScript.m @@ -1119,7 +1119,7 @@ + (BTCScriptChunk*) parseChunkFromData:(NSData*)scriptData offset:(NSUInteger)of if (offset + sizeof(dataLength) > length) return nil; memcpy(&dataLength, bytes + offset + sizeof(opcode), sizeof(dataLength)); - dataLength = CFSwapInt16LittleToHost(dataLength); + dataLength = CFSwapInt32LittleToHost(dataLength); NSUInteger chunkLength = sizeof(opcode) + sizeof(dataLength) + dataLength;