-Dmitry Timoshkov <dmitry at codeweavers.com>

wrc: Warn for duplicate dialog ids.

svn path=/trunk/; revision=38837
This commit is contained in:
Christoph von Wittich 2009-01-17 19:27:13 +00:00
parent 38026c3ee6
commit 5b5fdb7799
2 changed files with 17 additions and 0 deletions

View file

@ -4656,6 +4656,14 @@ static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control
if(prev)
prev->next = ctrl;
/* Check for duplicate identifiers */
while (prev)
{
if (ctrl->id != -1 && ctrl->id == prev->id)
parser_warning("Duplicate dialog control id %d\n", ctrl->id);
prev = prev->prev;
}
if(type != -1)
{
ctrl->ctlclass = new_name_id();
@ -5773,3 +5781,4 @@ static int rsrcid_to_token(int lookahead)
return token;
}

View file

@ -1966,6 +1966,14 @@ static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control
if(prev)
prev->next = ctrl;
/* Check for duplicate identifiers */
while (prev)
{
if (ctrl->id != -1 && ctrl->id == prev->id)
parser_warning("Duplicate dialog control id %d\n", ctrl->id);
prev = prev->prev;
}
if(type != -1)
{
ctrl->ctlclass = new_name_id();