From 397c72049f6b4cda0cc728f8a680a98212858db4 Mon Sep 17 00:00:00 2001 From: Dan Timson Date: Mon, 24 Feb 2020 17:41:16 +0000 Subject: [PATCH] bugfix for reading style names --- lib/jkqtplotter/jkqtpbaseplotterstyle.cpp | 2 +- lib/jkqtplotter/jkqtplotterstyle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jkqtplotter/jkqtpbaseplotterstyle.cpp b/lib/jkqtplotter/jkqtpbaseplotterstyle.cpp index 22a162f687..15585c4e2a 100644 --- a/lib/jkqtplotter/jkqtpbaseplotterstyle.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotterstyle.cpp @@ -103,7 +103,7 @@ void JKQTBasePlotterStyle::loadSettings(const QSettings &settings, const QString QString kk=k; kk.remove(0, start.size()); QString num=""; - while (kk.at(0).isDigit()) { + while (!kk.isEmpty() && kk.at(0).isDigit()) { num+=kk.at(0); kk.remove(0, 1); } diff --git a/lib/jkqtplotter/jkqtplotterstyle.cpp b/lib/jkqtplotter/jkqtplotterstyle.cpp index f1648f92f3..ae2b2fb3a8 100644 --- a/lib/jkqtplotter/jkqtplotterstyle.cpp +++ b/lib/jkqtplotter/jkqtplotterstyle.cpp @@ -84,7 +84,7 @@ void JKQTPlotterStyle::loadSettings(const QSettings &settings, const QString &gr QString kk=k; kk.remove(0, start.size()); QString num=""; - while (kk.at(0).isDigit()) { + while (!kk.isEmpty() && kk.at(0).isDigit()) { num+=kk.at(0); kk.remove(0, 1); }