From 0b5938e995b447e3bcc5ec1c4d9ce05b078b966f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 7 Jun 2005 13:12:43 +0000 Subject: [PATCH] added a TODO comment, I forgot to mention that anything but B_TRUNCATE_END is untested or broken git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12978 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/InterfaceDefs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/InterfaceDefs.cpp b/src/kits/interface/InterfaceDefs.cpp index aa143d0626..fd1c2b472c 100644 --- a/src/kits/interface/InterfaceDefs.cpp +++ b/src/kits/interface/InterfaceDefs.cpp @@ -786,7 +786,7 @@ copy_from_end(const char* src, char* dst, uint32 numChars, uint32 length, // ups, we definitely don't fit. go back until the ellipsis fits currentWidth += ellipsisWidth; // go forward again until ellipsis fits (already beyond the target) - for (int32 c2 = c; c2 < (int32)numChars; c2++) { + for (uint32 c2 = c; c2 < numChars; c2++) { //printf(" backward: %c (%ld) (%.1f - %.1f = %.1f)\n", *dst, c2, currentWidth, escapementArray[c2] * size, currentWidth - escapementArray[c2] * size); currentWidth -= escapementArray[c2] * size; do { @@ -882,6 +882,7 @@ truncate_string(const char* string, // FALL THROUGH (at least do something) case B_TRUNCATE_MIDDLE: + // TODO: VERY BROKEN! (will always insert "…" even if width is large enough) float halfWidth = width / 2.0; dst = copy_from_start(src, dst, numChars,