diff --git a/ChangeLog b/ChangeLog index 8f41bd688..19d373b48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-07-07 Eric Wasylishen + + * Source/GSCharacterPanel.m (-characterForRow:): Fix off-by-1 error + 2011-07-06 Eric Wasylishen * Tests/gui/NSView/NSView_autoresize_and_rounding.m: diff --git a/Source/GSCharacterPanel.m b/Source/GSCharacterPanel.m index 0460bddc7..fda0d2dae 100644 --- a/Source/GSCharacterPanel.m +++ b/Source/GSCharacterPanel.m @@ -259,7 +259,7 @@ static NSIndexSet *CodepointsWithNameContainingSubstring(NSString *str) - (NSString *)characterForRow: (NSInteger)row { - if (row > 0 && row < [visibleCodepoints count]) + if (row >= 0 && row < [visibleCodepoints count]) { UChar32 utf32 = [self codepointAtVisibleRow: row]; UChar utf16buf[2];