From 1bd707cd6ebea7bc8f840d1656b0c84959c117f8 Mon Sep 17 00:00:00 2001 From: Antoine Beauchamp Date: Mon, 7 Aug 2023 15:36:12 -0400 Subject: [PATCH] Fixed a bug in `readNumber()` where incorrect frequencies and duration were returned because the function was using an invalid buffer. --- src/anyrtttl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/anyrtttl.cpp b/src/anyrtttl.cpp index df8ea12..584e968 100644 --- a/src/anyrtttl.cpp +++ b/src/anyrtttl.cpp @@ -46,7 +46,7 @@ const char * readNumber(const char * iBuffer, int & oValue, ReadCharFuncPtr iRea oValue = 0; while(isdigit(iReadCharFunc(iBuffer))) { - oValue = (oValue * 10) + (readCharFunc(buffer) - '0'); + oValue = (oValue * 10) + (readCharFunc(iBuffer) - '0'); iBuffer++; } return iBuffer;