diff --git a/reactos/tools/spec2def/spec2def.c b/reactos/tools/spec2def/spec2def.c index 1d11a97df41..2b796937a57 100644 --- a/reactos/tools/spec2def/spec2def.c +++ b/reactos/tools/spec2def/spec2def.c @@ -569,7 +569,9 @@ ParseFile(char* pcStart, FILE *fileDest, PFNOUTLINE OutputLine) else { exp.nOrdinal = atol(pc); - exp.uFlags |= FL_ORDINAL; + /* The import lib should contain the ordinal only if -ordinal was specified */ + if (!gbImportLib) + exp.uFlags |= FL_ORDINAL; } /* Go to next token (type) */