From fdbf97b1c605a2a477e5d163f09559bc8a0ccbcd Mon Sep 17 00:00:00 2001 From: Tony Corbett G0WFV Date: Sat, 2 Jul 2016 22:56:22 +0100 Subject: [PATCH] Fix DMR unable to log into master due to locale issues When system locale used commas as decimal points, writeConfig() was sending an invalid config string to the master. --- DMRIPSC.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/DMRIPSC.cpp b/DMRIPSC.cpp index 4bad24b..db72784 100644 --- a/DMRIPSC.cpp +++ b/DMRIPSC.cpp @@ -466,6 +466,7 @@ bool CDMRIPSC::writeConfig() ::memcpy(buffer + 0U, "RPTC", 4U); ::memcpy(buffer + 4U, m_id, 4U); + setlocale(LC_ALL,"C"); ::sprintf(buffer + 8U, "%-8.8s%09u%09u%02u%02u%08f%09f%03d%-20.20s%-19.19s%c%-124.124s%-40.40s%-40.40s", m_callsign.c_str(), m_rxFrequency, m_txFrequency, m_power, m_colorCode, m_latitude, m_longitude, m_height, m_location.c_str(), m_description.c_str(), slots, m_url.c_str(), m_version, software);