advpack: Rewrite get_parameter so that it can handle empty
truiken at gmail.com
Mon Apr 3 12:50:15 CDT 2006
Please use this version instead of the last one, because I forgot to
add the extra HeapFree.
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.
* Rewrite get_parameter so that it can handle empty parameters.
dlls/advpack/files.c | 50 ++++++++++++++++++++++++++++++++------------------
1 files changed, 32 insertions(+), 18 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2554 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060403/a3d45d59/876ec5183e94f43708ef02750ce08a4b1e7c49e5.diff
More information about the wine-patches