summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-04-16 11:27:31 +0000
committerDennis Friis <peavey@placid.dk>2008-04-16 11:27:31 +0000
commita208bc13b69e2c3d1ef69eb3db66fd6de8b40025 (patch)
tree24c86919167c6aba038e22cc4fd3cd794505665a
parentfe02ca9dcaa593d361f0acebcfb514997dc4ca9e (diff)
downloadmana-a208bc13b69e2c3d1ef69eb3db66fd6de8b40025.tar.gz
mana-a208bc13b69e2c3d1ef69eb3db66fd6de8b40025.tar.bz2
mana-a208bc13b69e2c3d1ef69eb3db66fd6de8b40025.tar.xz
mana-a208bc13b69e2c3d1ef69eb3db66fd6de8b40025.zip
Fix a basic_string::at sometimes being out of range in BrowserBox::draw when checking for line separators.
-rw-r--r--ChangeLog5
-rw-r--r--src/gui/browserbox.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 62546bd4..8ec4e2ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-16 Dennis Friis <peavey@placid.dk>
+
+ * src/gui/browserbox.cpp: Fix a basic_string::at sometimes being out of range
+ in BrowserBox::draw when checking for line separators.
+
2008-04-16 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/gui/npc_text.h, src/gui/textbox.cpp, src/gui/npc_text.cpp,
diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp
index 185777d0..a2613389 100644
--- a/src/gui/browserbox.cpp
+++ b/src/gui/browserbox.cpp
@@ -380,8 +380,7 @@ BrowserBox::draw(gcn::Graphics *graphics)
}
// Check for line separators in format "---"
- if ((j <= 3) && (row.at(j) == '-') && (row.at(j + 1) == '-') &&
- (row.at(j + 2) == '-'))
+ if (row == "---")
{
for (x = 0; x < getWidth(); x++)
{