Commit 005de9e9 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

krnl386.exe16: Fix dialog size computation.

This partially reverts commit a5bf67ef, "kernel: Constify some formal parameters." Signed-off-by: 's avatarAlex Henrie <alexhenrie24@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 536d7d98
...@@ -596,24 +596,24 @@ WORD WINAPI GetDialog32Size16( LPCVOID dialog32 ) ...@@ -596,24 +596,24 @@ WORD WINAPI GetDialog32Size16( LPCVOID dialog32 )
p = (const DWORD *)p + 1; /* exStyle */ p = (const DWORD *)p + 1; /* exStyle */
nbItems = get_word(&p); nbItems = get_word(&p);
p = (const DWORD *)p + 1; /* x */ p = (const WORD *)p + 1; /* x */
p = (const DWORD *)p + 1; /* y */ p = (const WORD *)p + 1; /* y */
p = (const DWORD *)p + 1; /* cx */ p = (const WORD *)p + 1; /* cx */
p = (const DWORD *)p + 1; /* cy */ p = (const WORD *)p + 1; /* cy */
/* Skip menu name */ /* Skip menu name */
switch (*(const DWORD *)p) switch (*(const WORD *)p)
{ {
case 0x0000: p = (const DWORD *)p + 1; break; case 0x0000: p = (const WORD *)p + 1; break;
case 0xffff: p = (const DWORD *)p + 2; break; case 0xffff: p = (const WORD *)p + 2; break;
default: p = (LPCWSTR)p + strlenW( p ) + 1; break; default: p = (LPCWSTR)p + strlenW( p ) + 1; break;
} }
/* Skip class name */ /* Skip class name */
switch (*(const DWORD *)p) switch (*(const WORD *)p)
{ {
case 0x0000: p = (const DWORD *)p + 1; break; case 0x0000: p = (const WORD *)p + 1; break;
case 0xffff: p = (const DWORD *)p + 2; break; case 0xffff: p = (const WORD *)p + 2; break;
default: p = (LPCWSTR)p + strlenW( p ) + 1; break; default: p = (LPCWSTR)p + strlenW( p ) + 1; break;
} }
...@@ -623,11 +623,11 @@ WORD WINAPI GetDialog32Size16( LPCVOID dialog32 ) ...@@ -623,11 +623,11 @@ WORD WINAPI GetDialog32Size16( LPCVOID dialog32 )
/* Skip font info */ /* Skip font info */
if (style & DS_SETFONT) if (style & DS_SETFONT)
{ {
p = (const DWORD *)p + 1; /* pointSize */ p = (const WORD *)p + 1; /* pointSize */
if (dialogEx) if (dialogEx)
{ {
p = (const DWORD *)p + 1; /* weight */ p = (const WORD *)p + 1; /* weight */
p = (const DWORD *)p + 1; /* italic */ p = (const WORD *)p + 1; /* italic */
} }
p = (LPCWSTR)p + strlenW( p ) + 1; /* faceName */ p = (LPCWSTR)p + strlenW( p ) + 1; /* faceName */
} }
...@@ -650,29 +650,29 @@ WORD WINAPI GetDialog32Size16( LPCVOID dialog32 ) ...@@ -650,29 +650,29 @@ WORD WINAPI GetDialog32Size16( LPCVOID dialog32 )
p = (const DWORD *)p + 1; /* exStyle */ p = (const DWORD *)p + 1; /* exStyle */
} }
p = (const DWORD *)p + 1; /* x */ p = (const WORD *)p + 1; /* x */
p = (const DWORD *)p + 1; /* y */ p = (const WORD *)p + 1; /* y */
p = (const DWORD *)p + 1; /* cx */ p = (const WORD *)p + 1; /* cx */
p = (const DWORD *)p + 1; /* cy */ p = (const WORD *)p + 1; /* cy */
if (dialogEx) if (dialogEx)
p = (const DWORD *)p + 1; /* ID */ p = (const DWORD *)p + 1; /* ID */
else else
p = (const DWORD *)p + 1; /* ID */ p = (const WORD *)p + 1; /* ID */
/* Skip class name */ /* Skip class name */
switch (*(const DWORD *)p) switch (*(const WORD *)p)
{ {
case 0x0000: p = (const DWORD *)p + 1; break; case 0x0000: p = (const WORD *)p + 1; break;
case 0xffff: p = (const DWORD *)p + 2; break; case 0xffff: p = (const WORD *)p + 2; break;
default: p = (LPCWSTR)p + strlenW( p ) + 1; break; default: p = (LPCWSTR)p + strlenW( p ) + 1; break;
} }
/* Skip window name */ /* Skip window name */
switch (*(const DWORD *)p) switch (*(const WORD *)p)
{ {
case 0x0000: p = (const DWORD *)p + 1; break; case 0x0000: p = (const WORD *)p + 1; break;
case 0xffff: p = (const DWORD *)p + 2; break; case 0xffff: p = (const WORD *)p + 2; break;
default: p = (LPCWSTR)p + strlenW( p ) + 1; break; default: p = (LPCWSTR)p + strlenW( p ) + 1; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment