summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++)
{