Fixed incorrect sizeof in LinkReceiver::ReadRegion.

The type of BRegion::fCount is long, and ServerLink sends/receives it
with sizeof(long), but LinkReceiver was using sizeof(int32). Due to
long being 64 bit this was resulting in a mismatch. This fixes the
drawing problems on x86_64.
This commit is contained in:
Alex Smith 2012-08-09 18:10:49 +01:00
parent c0166cf22a
commit 4b8a51c34c
2 changed files with 2 additions and 2 deletions

View File

@ -443,7 +443,7 @@ err:
status_t
LinkReceiver::ReadRegion(BRegion* region)
{
status_t status = Read(&region->fCount, sizeof(int32));
status_t status = Read(&region->fCount, sizeof(long));
if (status >= B_OK)
status = Read(&region->fBounds, sizeof(clipping_rect));
if (status >= B_OK) {

View File

@ -861,7 +861,7 @@ ServerWindow::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)
if (link.Read<uint32>(&newWorkspaces) != B_OK)
break;
DTRACE(("ServerWindow %s: Message AS_SET_WORKSPACES %lx\n",
DTRACE(("ServerWindow %s: Message AS_SET_WORKSPACES %" B_PRIx32 "\n",
Title(), newWorkspaces));
fDesktop->SetWindowWorkspaces(fWindow, newWorkspaces);