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:
@@ -127,7 +127,7 @@ StyledEditView::GetStyledText(BPositionIO * stream)
|
|||||||
char textBuffer[256];
|
char textBuffer[256];
|
||||||
int32 textLength = 256;
|
int32 textLength = 256;
|
||||||
int32 bytes = bytesRead;
|
int32 bytes = bytesRead;
|
||||||
while (textLength > 0) {
|
while ((textLength > 0) && (bytes > 0)) {
|
||||||
result = convert_to_utf8(id,inPtr,&bytes,textBuffer,&textLength,&state);
|
result = convert_to_utf8(id,inPtr,&bytes,textBuffer,&textLength,&state);
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user