my next task was to fix this eheh. i think it would make more sense to just change
if(!params->PathBuffer && !params->PathBufferSize)
to
if(!params->PathBuffer)
as it was talked about in irc, it doesn't make much sense to check for pathbuffersize when pathbuffer is null... the max_path removal was a mistake from following msdn documentation :\
2009/3/22 James Hawkins truiken@gmail.com
dlls/setupapi/dialog.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
On Sun, Mar 22, 2009 at 4:04 PM, Ricardo Filipe ricardojdfilipe@gmail.com wrote:
my next task was to fix this eheh. i think it would make more sense to just change
if(!params->PathBuffer && !params->PathBufferSize)
to
if(!params->PathBuffer)
That's not what the patch does, but I did mistakenly leave an extra copy of requiredSize > params->PathBufferSize in the top if statement. Feel free to send a correct patch.
i know it's not what it does, it's an alternative someone refered in irc. i was wondering what you think would be the correct approach, since both fix the problem, the alternative just goes against the msdn documentation, which has been refered as not reliable :D
2009/3/23 James Hawkins truiken@gmail.com
On Sun, Mar 22, 2009 at 4:04 PM, Ricardo Filipe ricardojdfilipe@gmail.com wrote:
my next task was to fix this eheh. i think it would make more sense to just change
if(!params->PathBuffer && !params->PathBufferSize)
to
if(!params->PathBuffer)
That's not what the patch does, but I did mistakenly leave an extra copy of requiredSize > params->PathBufferSize in the top if statement. Feel free to send a correct patch.
-- James Hawkins
On Mon, Mar 23, 2009 at 9:38 AM, Ricardo Filipe ricardojdfilipe@gmail.com wrote:
i know it's not what it does, it's an alternative someone refered in irc. i was wondering what you think would be the correct approach, since both fix the problem, the alternative just goes against the msdn documentation, which has been refered as not reliable :D
Please bottom-post on this mailing list. My patch is correct except for what I said earlier, so just take it, remove that bit and resubmit it.
2009/3/23 James Hawkins truiken@gmail.com
On Mon, Mar 23, 2009 at 9:38 AM, Ricardo Filipe ricardojdfilipe@gmail.com wrote:
i know it's not what it does, it's an alternative someone refered in irc.
i
was wondering what you think would be the correct approach, since both
fix
the problem, the alternative just goes against the msdn documentation,
which
has been refered as not reliable :D
Please bottom-post on this mailing list. My patch is correct except for what I said earlier, so just take it, remove that bit and resubmit it.
-- James Hawkins
yes, your patch is correct. i was criticizing my implementation, and i just tested and i'm right in the critic, it returns NO_ERROR even if i give a null pathbuffer and not null pathbuffersize. so i'll send a patch to correct this, just not the way you did, i was just asking an opinion on the implementation ;)