changed to not exercise r5 lib-style convert_to_utf8 behavior on 0 bytes because the r5 lib-style behavior contradicts the bebook specification

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4277 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty 2003-08-13 05:44:31 +00:00
parent 5b7ea503a7
commit 5c78d8ec9e

View File

@ -127,7 +127,7 @@ StyledEditView::GetStyledText(BPositionIO * stream)
char textBuffer[256];
int32 textLength = 256;
int32 bytes = bytesRead;
while (textLength > 0) {
while ((textLength > 0) && (bytes > 0)) {
result = convert_to_utf8(id,inPtr,&bytes,textBuffer,&textLength,&state);
if (result != B_OK) {
return result;