added default clause to the switch statement. This fixes a memory corruption bug in case the caller supplied an invalid value. Now we use B_TRUNCATE_MIDDLE in that case. Found by Andrea Anzani
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21564 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fd8b35c86b
commit
58acd5acb8
@ -1319,6 +1319,7 @@ truncate_string(const char* string, uint32 mode, float width,
|
||||
// TODO: implement, though it was never implemented on R5
|
||||
// FALL THROUGH (at least do something)
|
||||
case B_TRUNCATE_MIDDLE:
|
||||
default:
|
||||
truncated = truncate_middle(source, dest, numChars, escapementArray,
|
||||
width, ellipsisWidth, fontSize);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user