I got a bit confused, since I ran into another (small) error, see https:// bugs.winehq.org/show_bug.cgi?id=48027 With native cmd it does work, so I suspected it's only that issue.
But you're completely right, I need to do the check differently, otherwise it hangs when using the < operator anyways. Thanks for investigating! I'll send in a patch right away.
Regards, Fabian Maurer