mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[0.4.7][SNDVOL32] Fix controls' offset (#280) CORE-9108
This fixes an assert in the sndvol32:
base/applications/sndvol32/dialog.c Line148 hwnd is NULL
by partial backport of
0.4.8-dev-877-g a30d12dde7
This commit is contained in:
parent
be37004c6c
commit
4af9e16e6e
1 changed files with 8 additions and 14 deletions
|
@ -104,7 +104,7 @@ AddDialogControl(
|
|||
default:
|
||||
/* FIXME */
|
||||
assert(0);
|
||||
ClassName = 0;
|
||||
ClassName = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -112,12 +112,14 @@ AddDialogControl(
|
|||
/* class name is encoded as string */
|
||||
ClassName = (LPWSTR)Offset;
|
||||
|
||||
/* adjust offset */
|
||||
Offset += wcslen(ClassName) + 1;
|
||||
/* move offset to the end of class string */
|
||||
Offset += wcslen(ClassName);
|
||||
|
||||
/* get offset */
|
||||
/* get window name */
|
||||
WindowName = (LPWSTR)(Offset + 1);
|
||||
}
|
||||
/* move offset past class type/string */
|
||||
Offset++;
|
||||
|
||||
if (DialogItem->id == MAXWORD)
|
||||
{
|
||||
|
@ -176,16 +178,8 @@ AddDialogControl(
|
|||
|
||||
if (WindowName != NULL)
|
||||
{
|
||||
/* position offset to start of name */
|
||||
Offset++;
|
||||
|
||||
/* move offset past name */
|
||||
Offset += wcslen((LPWSTR)Offset) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no name so just adjust offset */
|
||||
Offset++;
|
||||
/* move offset past window name */
|
||||
Offset += wcslen(WindowName) + 1;
|
||||
}
|
||||
|
||||
/* check if there is additional data */
|
||||
|
|
Loading…
Reference in a new issue