From 543660f1a7c03634c6bec184a47dfd7c9845f17f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 13 Nov 2022 14:13:33 -0800 Subject: Avoid a potential unsigned underflow --- core/converter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/converter.h b/core/converter.h index b6ff3ba5..01becea2 100644 --- a/core/converter.h +++ b/core/converter.h @@ -41,7 +41,7 @@ struct SampleConverter { using SampleOffset = std::chrono::duration>; SampleOffset currentInputDelay() const noexcept { - const int64_t prep{mSrcPrepCount - MaxResamplerEdge}; + const int64_t prep{int64_t{mSrcPrepCount} - MaxResamplerEdge}; return SampleOffset{(prep<