From 40b8d32f847c9d2ded49efd5c127229ff05097f5 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 2 Oct 2017 12:51:26 +0100 Subject: [PATCH] Map the module id correctly. --- Voice.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Voice.cpp b/Voice.cpp index 6fddac1..9373859 100644 --- a/Voice.cpp +++ b/Voice.cpp @@ -141,6 +141,9 @@ void CVoice::linkedTo(unsigned int number, unsigned int room) words.push_back(std::string(1U, letters[1U])); words.push_back(std::string(1U, letters[2U])); + // 4001 => 1 => A, 4002 => 2 => B, etc. + room %= 100U; + if (room >= 1U && room <= 26U) words.push_back(std::string(1U, 'A' + room - 1U));