diff options
Diffstat (limited to 'src/MTS_IO_CellularRadio.cpp')
-rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index 6954368..71c4465 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -1084,7 +1084,11 @@ std::string CellularRadio::queryLteLac() { } else { size_t start = CGREGstring.find(":") + 1; //Position right after "#RFSTS:" std::vector<std::string> vParts = MTS::Text::split(MTS::Text::trim(CGREGstring.substr(start)), ","); - result = MTS::Text::strip(vParts[2], '"'); + if(vParts.size() < 3) { + result = CellularRadio::VALUE_UNAVAILABLE; + } else { + result = MTS::Text::strip(vParts[2], '"'); + } } setCGREG(originalCGREG); |