https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e022d8d7cb72bc611d699…
commit e022d8d7cb72bc611d6990062ad0f2962c0cab1d
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Fri Jan 18 00:07:23 2019 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Mon Jan 21 22:25:29 2019 +0100
[WIN32SS] Require at least the amount of extra memory, not the exact amount
This fixes Civ II trying to create scrollbars based on 'native' scrollbars.
---
win32ss/user/ntuser/scrollbar.c | 2 +-
win32ss/user/user32/controls/scrollbar.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c
index 582a603c1f..325be6fe49 100644
--- a/win32ss/user/ntuser/scrollbar.c
+++ b/win32ss/user/ntuser/scrollbar.c
@@ -90,7 +90,7 @@ IntGetSBData(PWND pwnd, INT Bar)
case SB_VERT:
return &pSBInfo->Vert;
case SB_CTL:
- if ( pwnd->cbwndExtra != (sizeof(SBWND)-sizeof(WND)) )
+ if ( pwnd->cbwndExtra < (sizeof(SBWND)-sizeof(WND)) )
{
ERR("IntGetSBData Wrong Extra bytes for CTL Scrollbar!\n");
return 0;
diff --git a/win32ss/user/user32/controls/scrollbar.c
b/win32ss/user/user32/controls/scrollbar.c
index 0a4913353c..3eb0242961 100644
--- a/win32ss/user/user32/controls/scrollbar.c
+++ b/win32ss/user/user32/controls/scrollbar.c
@@ -100,7 +100,7 @@ IntGetSBData(PWND pwnd, INT Bar)
case SB_VERT:
return &pSBInfo->Vert;
case SB_CTL:
- if ( pwnd->cbwndExtra != (sizeof(SBWND)-sizeof(WND)) )
+ if ( pwnd->cbwndExtra < (sizeof(SBWND)-sizeof(WND)) )
{
ERR("IntGetSBData Wrong Extra bytes for CTL Scrollbar!\n");
return 0;
@@ -1186,7 +1186,7 @@ ScrollBarWndProc_common(WNDPROC DefWindowProc, HWND Wnd, UINT Msg,
WPARAM wParam
if (!pWnd->fnid)
{
TRACE("ScrollBar CTL size %d\n", (sizeof(SBWND)-sizeof(WND)));
- if ( pWnd->cbwndExtra != (sizeof(SBWND)-sizeof(WND)) )
+ if ( pWnd->cbwndExtra < (sizeof(SBWND)-sizeof(WND)) )
{
ERR("Wrong Extra bytes for Scrollbar!\n");
return 0;