From 23d431234ca5b573b240b27ab7b2da080cad2a8d Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Fri, 13 Nov 2020 05:41:42 +0000 Subject: [PATCH] Fix bug in offset --- Source/NSData.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/NSData.m b/Source/NSData.m index b8775692b..2f936868b 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -1133,7 +1133,8 @@ failure: { searchRange.length = countOther; } - if (memcmp(&bytesSelf[0], &bytesOther[0], countOther) == 0) + if (memcmp(&bytesSelf[searchRange.location], &bytesOther[0], + countOther) == 0) { result = searchRange; }