From d67b1efc99f2d26dab785e0475a544186cede11a Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Sun, 17 Sep 2006 13:34:15 +0000 Subject: [PATCH] Fixed broken endlines. This breaks a bit more 'password mode', but it wasn't 100% working yet anyway git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18874 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index ca35684849..9bfd1bb0a1 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -3681,7 +3681,10 @@ BTextView::DrawLines(int32 startLine, int32 endLine, int32 startOffset, bool era } const char *string = fText->GetString(offset, numBytes); - view->DrawString(string); + // TODO: GetString() could return less or more bytes than requested + // Improve the backend api so it's more robust and pass back the returned + // bytes + view->DrawString(string, numBytes); if (foundTab) { float penPos = PenLocation().x - fTextRect.left;