fix scanf handling of "0" (followed by immediate EOF) with "%x"