fTriggerIndex was still a byte index in BMenuItem::SetTrigger() - this one

fixes bug #1506 once and for all :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22476 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-10-07 17:20:28 +00:00
parent bf95c9aee6
commit f1be468272

View File

@ -265,7 +265,7 @@ BMenuItem::SetTrigger(char trigger)
pos = strchr(Label(), trigger);
}
if (pos != NULL) {
fTriggerIndex = pos - Label();
fTriggerIndex = UTF8CountChars(Label(), pos - Label());
fTrigger = tolower(UTF8ToCharCode(&pos));
} else {
fTrigger = 0;