From 5ed970ca7d4e079ca9ff577974572a577c65e823 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 28 Jan 2019 10:31:55 +0000 Subject: Fix parsing anticaps mode parameters (again). It is better to fix the underlying bug than the result of it. This replaces commit 963213132dd923d0e7dbd47ea6f20373cdef343b. --- src/modules/m_anticaps.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_anticaps.cpp b/src/modules/m_anticaps.cpp index aa605e6ed..e916edd53 100644 --- a/src/modules/m_anticaps.cpp +++ b/src/modules/m_anticaps.cpp @@ -34,9 +34,9 @@ class AntiCapsSettings public: const AntiCapsMethod method; const uint16_t minlen; - const uint16_t percent; + const uint8_t percent; - AntiCapsSettings(const AntiCapsMethod& Method, const uint16_t& MinLen, const uint16_t& Percent) + AntiCapsSettings(const AntiCapsMethod& Method, const uint16_t& MinLen, const uint8_t& Percent) : method(Method) , minlen(MinLen) , percent(Percent) @@ -83,13 +83,13 @@ class AntiCapsMode : public ParamMode(percentstr); + uint8_t result = ConvToNum(percentstr); if (result < 1 || result > 100) return false; @@ -108,7 +108,7 @@ class AntiCapsMode : public ParamModeminlen)); out.push_back(':'); - out.append(ConvToStr(acs->percent)); + out.append(ConvNumeric(acs->percent)); } }; -- cgit v1.2.3