http://bugs.winehq.org/show_bug.cgi?id=10618
--- Comment #2 from Darragh Bailey felix@compsoc.nuigalway.ie 2007-11-30 20:09:12 ---
Looking at the first loop in build_argv demonstrates the problem perfectly.
Everything is working fine up until it starts to look at the following string 'S', 'E', 'T', 'U', 'P', 'E', 'X', 'E', 'P', 'A', 'T', 'H', '=', '"', 'C', ':', '', 'w', 'i', 'n', 'd', 'o', 'w', 's', '', 't', 'e', 'm', 'p', '', 'I', 'X', 'P', '0', '3', '1', '.', 'T', 'M', 'P', '', '"', ' ',
At the point it reaches the following characters '', '"', ' ', argc=5, in_quotes=1 & bcount=0
loop on '' causes bcount=1 loop on '"' the causes the following line of code to evaluate as false } else if ((*s=='"') && ((bcount & 1)==0)) {
As a result in_quotes remains at 1 and it doesn't recognise the end of the argument on the space in the following loop.
Looks like it needs an improved test to determine when it has in fact encountered an escaped quote.