How many bugs out there?
The Lounge
21
Posts
17
Posters
0
Views
1
Watching
-
_fboy_ wrote:
I was thinking about the Windows bug caused by a forgotten "&". It made me think that the compiler would raise a warning in a such situation. So, they must have ignored it.
It wasn't a forgotten & - it was an extra one. Instead of passing a pointer, they passed the address of a pointer. Depending on function declarations, a compiler may not spot this, for the simple reason the types are the same. Passing the address of a pointer is fairly common in COM (see QueryInterface[^] for an example.
And I wonder how can you trust an interface called IUnknown? :laugh: