|
From: <cn...@us...> - 2023-05-26 01:06:21
|
Revision: 1386
http://sourceforge.net/p/seq/svn/1386
Author: cn187
Date: 2023-05-26 01:06:19 +0000 (Fri, 26 May 2023)
Log Message:
-----------
[qt6] work around spell file parse issue
Modified Paths:
--------------
showeq/branches/cn187_devel/src/spells.cpp
Modified: showeq/branches/cn187_devel/src/spells.cpp
===================================================================
--- showeq/branches/cn187_devel/src/spells.cpp 2023-05-25 23:41:58 UTC (rev 1385)
+++ showeq/branches/cn187_devel/src/spells.cpp 2023-05-26 01:06:19 UTC (rev 1386)
@@ -301,8 +301,13 @@
// iterate over the lines and process the spell entries therein.
for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
+ //with Qt6, the split is leaving a line with only a null character in it,
+ //which causes the program to abort when it tries to process the almost
+ //empty line. This works around it. TODO investigate further and fix
+ if (it->remove('\0').isEmpty())
+ break;
newSpell = new Spell(*it);
-
+
// calculate the maximum spell ID
if (newSpell->spell() > m_maxSpell)
m_maxSpell = newSpell->spell();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|