Author: grumbel
Date: 2007-08-14 23:53:51 +0200 (Tue, 14 Aug 2007)
New Revision: 2918
Modified:
branches/pingus_sdl/TODO
branches/pingus_sdl/src/line_iterator.cpp
Log:
- fixed bug in LineIterator when line only has a single char
Modified: branches/pingus_sdl/TODO
===================================================================
--- branches/pingus_sdl/TODO 2007-08-14 21:03:46 UTC (rev 2917)
+++ branches/pingus_sdl/TODO 2007-08-14 21:53:51 UTC (rev 2918)
@@ -61,8 +61,6 @@
- src/components/pingus_counter.hpp font should be fixed-width/monospace
-- ActionButton doesn't display action count sometimes
-
Nice to Have:
=============
Modified: branches/pingus_sdl/src/line_iterator.cpp
===================================================================
--- branches/pingus_sdl/src/line_iterator.cpp 2007-08-14 21:03:46 UTC (rev
2917)
+++ branches/pingus_sdl/src/line_iterator.cpp 2007-08-14 21:53:51 UTC (rev
2918)
@@ -39,7 +39,7 @@
bool
LineIterator::next()
{
- if (line_end == last || line_end+1 == last)
+ if (line_end == last || (line_end+1 == last && *first == '\n'))
{
return false;
}
@@ -89,6 +89,7 @@
test("Hello Four\n");
test("Hello\nWorld\nFooBar\n");
test("Hello\nWorld\nFooBar\n\n");
+ test("1");
return 0;
}
#endif
_______________________________________________
pingus-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pingus-cvs