Skip to content

Commit

Permalink
fix: [debugger] crash when fetch threads
Browse files Browse the repository at this point in the history
Log: as title
  • Loading branch information
LiHua000 committed Aug 20, 2024
1 parent d52cd0a commit 8be10c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools/debugadapter/debugger/gdbmi/gdbmi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ QString::const_iterator& skipspaces(QString::const_iterator& it)
QString parseString(const QString& s, QString::const_iterator& it)
{
QString v;
while (it != s.cend()) {
while (it < s.cend()) {
if (*it == '"')
break;
if (*it == '\\')
Expand Down Expand Up @@ -112,7 +112,7 @@ QVariant parseValue(const QString& str, QString::const_iterator& it, QChar termi
QVariantList parseArray(const QString& str, QString::const_iterator& it)
{
QVariantList l;
while (it != str.cend() && *it != ']') {
while (it < str.cend() && *it != ']') {
l.append(parseValue(str, it, ']'));
if (*it == ']') {
++it;
Expand All @@ -133,7 +133,7 @@ QVariantMap parseDict(const QString& str, QString::const_iterator& it)
QVariantMap parseKeyVal(const QString& str, QString::const_iterator& it, QChar terminator)
{
QVariantMap m;
while (it != str.cend() && *it != terminator) {
while (it < str.cend() && *it != terminator) {
auto k = parseKey(str, skipspaces(it));
auto v = parseValue(str, skipspaces(++it), terminator);
// qInfo() << "Key => " << k;
Expand Down

0 comments on commit 8be10c9

Please sign in to comment.