Fix for bug #2181. Changes the extra value of the standard edit class from 4 to 6.

Julius Schwartzenberg julius.schwartzenberg at gmail.com
Sun Oct 11 08:27:44 CDT 2009


---
 dlls/user32/edit.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 8ad945b..e42ed41 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -5410,13 +5410,19 @@ static LRESULT WINAPI EditWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l
  * edit class descriptor
  */
 static const WCHAR editW[] = {'E','d','i','t',0};
+#ifdef _WIN64
+#define EDIT_EXTRA_VALUE 0
+#else
+#define EDIT_EXTRA_VALUE 2 /* This has to be 6 in total for 32-bit, otherwise Civilization II crashes, bug #2181  */
+#endif
 const struct builtin_class_descr EDIT_builtin_class =
 {
     editW,                /* name */
     CS_DBLCLKS | CS_PARENTDC,   /* style */
     EditWndProcA,         /* procA */
     EditWndProcW,         /* procW */
-    sizeof(EDITSTATE *),  /* extra */
+    sizeof(EDITSTATE *) + EDIT_EXTRA_VALUE,   /* extra */
     IDC_IBEAM,            /* cursor */
     0                     /* brush */
 };
+#undef EDIT_EXTRA_VALUE
-- 
1.6.0.4


--------------040307020400030303030609
Content-Type: text/plain;
 name="0002-Adding-extra-class-value-tests-for-the-standard-classe.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename*0="0002-Adding-extra-class-value-tests-for-the-standard-classe.";
 filename*1="txt"



More information about the wine-devel mailing list