From 08db2111e11a202956f2f4294a1f9b1cc2a8ef01 Mon Sep 17 00:00:00 2001 From: shatty Date: Sun, 6 Jul 2003 09:11:27 +0000 Subject: [PATCH] format nuking, but working input conversion git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3868 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/stylededit/StyledEditView.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/stylededit/StyledEditView.cpp b/src/apps/stylededit/StyledEditView.cpp index 5c476958d6..bf97fd3f76 100644 --- a/src/apps/stylededit/StyledEditView.cpp +++ b/src/apps/stylededit/StyledEditView.cpp @@ -116,18 +116,18 @@ StyledEditView::GetStyledText(BPositionIO * stream) int32 state = 0; int32 bytesRead; while ((bytesRead = stream->ReadAt(location,inBuffer,256)) > 0) { - location += bytesRead; char * inPtr = inBuffer; char textBuffer[256]; int32 textLength = 256; - int32 bytesConverted = bytesRead; + int32 bytes = bytesRead; while (textLength > 0) { - convert_to_utf8(id,inPtr,&bytesConverted,textBuffer,&textLength,&state); + convert_to_utf8(id,inPtr,&bytes,textBuffer,&textLength,&state); InsertText(textBuffer,textLength,textOffset); textOffset += textLength; - inPtr += bytesConverted; - bytesRead -= bytesConverted; - bytesConverted = bytesRead; + inPtr += bytes; + location += bytes; + bytesRead -= bytes; + bytes = bytesRead; if (textLength > 0) { textLength = 256; }