From 97fa2f0e8a3c8fcae715a2f86258283321550efb Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 31 Jul 2023 14:50:32 +0100 Subject: [PATCH] Convolution: Fix integer conversion in unit tests --- modules/juce_dsp/frequency/juce_Convolution_test.cpp | 2 +- modules/juce_graphics/image_formats/juce_GIFLoader.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/juce_dsp/frequency/juce_Convolution_test.cpp b/modules/juce_dsp/frequency/juce_Convolution_test.cpp index 2096d47758..e705f9d15f 100644 --- a/modules/juce_dsp/frequency/juce_Convolution_test.cpp +++ b/modules/juce_dsp/frequency/juce_Convolution_test.cpp @@ -470,7 +470,7 @@ public: Convolution::Stereo::no, Convolution::Trim::yes, Convolution::Normalise::no, - AudioBlock (channels, numElementsInArray (channels), length)); + AudioBlock (channels, numElementsInArray (channels), (size_t) length)); } beginTest ("IRs with extra silence are trimmed appropriately"); diff --git a/modules/juce_graphics/image_formats/juce_GIFLoader.cpp b/modules/juce_graphics/image_formats/juce_GIFLoader.cpp index f2cd0d86b1..6b3fb0f25b 100644 --- a/modules/juce_graphics/image_formats/juce_GIFLoader.cpp +++ b/modules/juce_graphics/image_formats/juce_GIFLoader.cpp @@ -324,8 +324,8 @@ private: if (finished) return -1; - buffer[0] = buffer [lastByteIndex - 2]; - buffer[1] = buffer [lastByteIndex - 1]; + buffer[0] = buffer [jmax (0, lastByteIndex - 2)]; + buffer[1] = buffer [jmax (0, lastByteIndex - 1)]; const int n = readDataBlock (buffer + 2);