https://bugs.winehq.org/show_bug.cgi?id=46694
--- Comment #1 from Timothy Pearson tpearson@raptorengineering.com --- There is a questionable statement in tools/widl/write_msft.c, line 2162:
if (-1 < tunion->typelib_idx)
When widl crashes, typelib_idx is == -1, which as I understand it indicates the index is invalid? However, the above statement does not trap the invalid index.
Changing the statement to read as follows resolves the crash:
if (-1 <= tunion->typelib_idx)
Is this change correct in the context of widl design?