summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-01-03 23:18:05 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-01-03 23:19:29 +0100
commitb9fbd8529d6aa8d8f229eae81b16134de07db346 (patch)
treeceea6eecbd26c973441ee5f4f05362fd78c72cb0 /src/gui/widgets
parent0bb9a42066e4cf0f9fbc83fa2e742053dc40f1d4 (diff)
parent2851c8962522a4e8f8b62a498b113dc6b1eab56d (diff)
downloadmana-b9fbd8529d6aa8d8f229eae81b16134de07db346.tar.gz
mana-b9fbd8529d6aa8d8f229eae81b16134de07db346.tar.bz2
mana-b9fbd8529d6aa8d8f229eae81b16134de07db346.tar.xz
mana-b9fbd8529d6aa8d8f229eae81b16134de07db346.zip
Merge branch '0.5'
Conflicts: po/es.po po/fr.po src/net/tmwa/adminhandler.cpp update-creator.sh
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 314429fa..d553312b 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -280,7 +280,7 @@ void BrowserBox::draw(gcn::Graphics *graphics)
graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight()));
}
- if (mSelectedLink >= 0)
+ if (mSelectedLink >= 0 && (unsigned) mSelectedLink < mLinks.size())
{
if ((mHighMode & BACKGROUND))
{
@@ -326,7 +326,7 @@ int BrowserBox::calcHeight()
{
int x = 0, y = 0;
int wrappedLines = 0;
- int link = 0;
+ unsigned link = 0;
gcn::Font *font = getFont();
int fontHeight = font->getHeight();
@@ -423,7 +423,7 @@ int BrowserBox::calcHeight()
}
}
- if (c == '<')
+ if (c == '<' && link < mLinks.size())
{
const int size =
font->getWidth(mLinks[link].caption) + 1;