Added check for duplicate ordinals, and fixed bug it uncovered in

msnet32.spec.
This commit is contained in:
Alexandre Julliard 2003-03-20 03:30:58 +00:00
parent f181303246
commit f84dbdce51
2 changed files with 6 additions and 2 deletions

View File

@ -54,7 +54,6 @@
54 stub @ 54 stub @
55 stub @ 55 stub @
56 stub @ 56 stub @
57 stub @
57 stdcall @(long long ptr long ptr) MSNET32_57 57 stdcall @(long long ptr long ptr) MSNET32_57
58 stub @ 58 stub @
59 stub @ 59 stub @

View File

@ -517,6 +517,11 @@ static int ParseOrdinal(int ordinal)
if (ordinal > Limit) Limit = ordinal; if (ordinal > Limit) Limit = ordinal;
if (ordinal < Base) Base = ordinal; if (ordinal < Base) Base = ordinal;
odp->ordinal = ordinal; odp->ordinal = ordinal;
if (Ordinals[ordinal])
{
error( "Duplicate ordinal %d\n", ordinal );
goto error;
}
Ordinals[ordinal] = odp; Ordinals[ordinal] = odp;
} }