count() can return some funky values. So check it before adding it to anything.
From: Erik Hovland <erik@hovland.org>
---
libs/libmythtv/eitfixup.cpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/libs/libmythtv/eitfixup.cpp b/libs/libmythtv/eitfixup.cpp
index 6ec5fd2..f9d537e 100644
a
|
b
|
void EITFixUp::SetUKSubtitle(DBEvent &event) const |
342 | 342 | int i; |
343 | 343 | for (i =0; (i<(int)strListColon.count()) && (nTitleMax==-1);i++) |
344 | 344 | { |
345 | | if ((nTitle+= |
346 | | QStringList::split(" ",strListColon[i],TRUE).count()) |
347 | | <kMaxToTitle) |
| 345 | nTitle+=QStringList::split(" ",strListColon[i],TRUE).count(); |
| 346 | if (nTitle<kMaxToTitle) |
348 | 347 | strListTmp.push_back(strListColon[i]); |
349 | 348 | else |
350 | 349 | nTitleMax=i; |