Skip to content

Commit

Permalink
Fix up GMEM_MOVEABLE patches for wine commit 704d066.
Browse files Browse the repository at this point in the history
  • Loading branch information
openglfreak committed Jun 2, 2021
1 parent d8c45e1 commit 34572d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ index dc1a3cd72c..8a0a20e153 100644
+ if (is_win9x())
+ ptr -= HGLOBAL_STORAGE;
+ retval = HeapSize(GetProcessHeap(), 0, ptr );
+ if (is_win9x() && retval != ~0ul) retval -= HGLOBAL_STORAGE;
+ if (is_win9x() && retval != ~(SIZE_T)0) retval -= HGLOBAL_STORAGE;
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ index a465ce45d7..2d655a010a 100644
{
retval=HeapSize(GetProcessHeap(), 0, hmem);

- if (retval == ~0ul) /* It might be a GMEM_MOVEABLE data pointer */
+ if (is_win9x() && retval == ~0ul) /* It might be a GMEM_MOVEABLE data pointer */
- if (retval == ~(SIZE_T)0) /* It might be a GMEM_MOVEABLE data pointer */
+ if (is_win9x() && retval == ~(SIZE_T)0) /* It might be a GMEM_MOVEABLE data pointer */
{
retval = HeapSize(GetProcessHeap(), 0, (char*)hmem - HGLOBAL_STORAGE);
if (retval != ~0ul) retval -= HGLOBAL_STORAGE;
Expand All @@ -183,12 +183,12 @@ index a465ce45d7..2d655a010a 100644
else
{
- retval = HeapSize(GetProcessHeap(), 0, (char *)pintern->Pointer - HGLOBAL_STORAGE );
- if (retval != ~0ul) retval -= HGLOBAL_STORAGE;
- if (retval != ~(SIZE_T)0) retval -= HGLOBAL_STORAGE;
+ const char *ptr = pintern->ptr;
+ if (is_win9x())
+ ptr -= HGLOBAL_STORAGE;
+ retval = HeapSize(GetProcessHeap(), 0, ptr );
+ if (is_win9x() && retval != ~0ul) retval -= HGLOBAL_STORAGE;
+ if (is_win9x() && retval != ~(SIZE_T)0) retval -= HGLOBAL_STORAGE;
}
}
else
Expand Down

0 comments on commit 34572d6

Please sign in to comment.