From 9de22ffaf100344f0c0d41d9ef97dc05763919c1 Mon Sep 17 00:00:00 2001 From: vsonnier Date: Sat, 11 Jun 2016 13:15:01 +0200 Subject: [PATCH] LABEL: Fix for crash when labels looks like numbers... --- src/AppFrame.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 254ec6c..7dab955 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -1695,9 +1695,12 @@ bool AppFrame::loadSession(std::string fileName) { DataNode *demodUserLabel = demod->hasAnother("user_label") ? demod->getNext("user_label") : nullptr; - if (demodUserLabel && demodUserLabel->element()->getDataType() == DATA_STRING) { - demodUserLabel->element()->get(user_label); + if (demodUserLabel) { + //toString() re-formats strings recognized as numerals, but at least it works for + //all kind of data. + user_label = demodUserLabel->element()->toString(); } + ModemSettings mSettings;