From bb9ff7ee8a2644ba7d932ae869ca3b015ee653a9 Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Fri, 24 Feb 2023 09:53:12 -0800 Subject: [PATCH] Update tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs Co-authored-by: Mike Harder --- tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs index fc9d1799008..dc937bc325c 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs @@ -492,7 +492,7 @@ public byte[][] GetBatches(byte[] bodyData, int batchCount) for(int i = 0; i < batches.Length; i++) { - var calculatedChunkLength = i == batches.Length - 1 && batches.Length > 1 && remainder > 0 ? remainder : chunkLength; + var calculatedChunkLength = ((i == batches.Length - 1) && (batches.Length > 1) && (remainder > 0)) ? remainder : chunkLength; var batch = new byte[calculatedChunkLength]; Array.Copy(bodyData, i * chunkLength, batch, 0, calculatedChunkLength);