Global variables that don't have an initializer are automatically zeroed, so an explicit = 0 isn't necessary.
We absolutely should check for '*' and take that to mean everything. I thought I had implemented that, but apparently did not.
All of this mimics Windows's behavior, which I believe is why -1 is also recognized. Windows actually supports full wildcard matching (e.g. '*b?' covers 'dcba', 'bA') which we obviously also still lack.