initialize m_cursor, fix cursorValid
authorFelix Domke <tmbinc@2mac.waldobjekt.org>
Mon, 29 Jun 2009 23:30:40 +0000 (01:30 +0200)
committerFelix Domke <tmbinc@2mac.waldobjekt.org>
Mon, 29 Jun 2009 23:30:40 +0000 (01:30 +0200)
lib/gui/elistboxcontent.cpp

index 3c9457e..e05da21 100644 (file)
@@ -49,7 +49,7 @@ int iListboxContent::currentCursorSelectable()
 
 DEFINE_REF(eListboxPythonStringContent);
 
-eListboxPythonStringContent::eListboxPythonStringContent(): m_itemheight(25)
+eListboxPythonStringContent::eListboxPythonStringContent(): m_itemheight(25), m_cursor(0)
 {
 }
 
@@ -81,7 +81,7 @@ int eListboxPythonStringContent::cursorMove(int count)
 
 int eListboxPythonStringContent::cursorValid()
 {
-       return m_cursor < size();
+       return ((unsigned int)m_cursor) < size();
 }
 
 int eListboxPythonStringContent::cursorSet(int n)