advpack: Rewrite get_parameter so that it can handle empty parameters

James Hawkins truiken at gmail.com
Mon Apr 3 12:45:56 CDT 2006


Hi,

The original get_parameter didn't work in that it would return the
correct beginning of the parameter, but the string would run until the
end of the parameter list because it's not NULL separated.  I could
have written get_parameter so that the list is double NULL-terminated,
but we wouldn't be able to catch empty parameters, such as the list
'one,two,,,five' where the third and fourth parameters are empty and
get_parameter should return NULL.  If we handled it like it was double
NULL-terminated, we would always stop traversing the list when we
reach an empty parameter.

Changelog:
* Rewrite get_parameter so that it can handle empty parameters.

 dlls/advpack/files.c |   49 +++++++++++++++++++++++++++++++------------------
 1 files changed, 31 insertions(+), 18 deletions(-)

--
James Hawkins
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8b43f9b714a693491038bf24bc994e09a5624acc.diff
Type: text/x-patch
Size: 2371 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060403/726c548e/8b43f9b714a693491038bf24bc994e09a5624acc.diff


More information about the wine-patches mailing list