* of by one, while left points behind the chars to copy

right points to the first charater to start copy with



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27294 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Karsten Heimrich 2008-09-03 02:15:30 +00:00
parent b0b6878c97
commit 84d0e984f3

View File

@ -1360,12 +1360,12 @@ truncate_middle(const char* source, char* dest, uint32 numChars,
// try right letter first
if (escapementArray[right - 1] * size <= gap) {
right--;
} else if (escapementArray[left + 1] * size <= gap) {
} else if (escapementArray[left] * size <= gap) {
left++;
}
} else {
// try left letter first
if (escapementArray[left + 1] * size <= gap) {
if (escapementArray[left] * size <= gap) {
left++;
} else if (escapementArray[right - 1] * size <= gap) {
right--;