* If only a part of the data could be read, the part that couldn't been read
is now cleared - this changes the behaviour of bug #603, but doesn't fix it (as this is no DiskProbe bug). * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17621 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b0e0bf889d
commit
a93fb72be9
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -939,6 +939,11 @@ DataEditor::Update()
|
||||
if (bytesRead < B_OK)
|
||||
return bytesRead;
|
||||
|
||||
if ((size_t)bytesRead < fRealViewSize) {
|
||||
// make sure the rest of data is cleared
|
||||
memset(fView + bytesRead, 0, fRealViewSize - bytesRead);
|
||||
}
|
||||
|
||||
ApplyChanges();
|
||||
fNeedsUpdate = false;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -359,7 +359,7 @@ DataView::Draw(BRect updateRect)
|
||||
BPoint location(kHorizontalSpace, kVerticalSpace + fAscent);
|
||||
|
||||
for (uint32 i = 0; i < fSizeInView; i += kBlockSize) {
|
||||
ConvertLine(line, /*fOffset + */i, fData + i, fSizeInView - i);
|
||||
ConvertLine(line, i, fData + i, fSizeInView - i);
|
||||
DrawString(line, location);
|
||||
|
||||
location.y += fFontHeight;
|
||||
|
Loading…
Reference in New Issue
Block a user