"Real" source of WebDAV plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
extasic
Junior Member
Junior Member
Posts: 6
Joined: 2009-01-13, 07:10 UTC

"Real" source of WebDAV plugin

Post by *extasic »

Hi!

I just downloaded the source code of the WebDAV plugin, but this can't really be the same version that can be downloaded as a binary, because of at least one critical error:

davfunc.cpp

Code: Select all

398: 	for (int iChar = 0; iChar < iEncryptedLength / 3 && iChar < (int) (cchPlain - 1); iChar++)
399:	{
               ...
425:	}
426:
427:	pszPlain[iChar] = _TCHAR('\0');
On line 427 the variable "iChar" is used out of its scope. There are a few other errors, so I think there might be another "working" version of the code. Is this available as well?

Thank you in advance!
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

iChar is not out of scope. In C++ you can reuse the variable declared as a for loop variable... To make the test... Try to declare iChar after the loop. The compiler will complain about redefinition.

iChar has the value of the for condition + 1.

HTH
CoolWater
extasic
Junior Member
Junior Member
Posts: 6
Joined: 2009-01-13, 07:10 UTC

Post by *extasic »

I am using VS 2008 and if I redefine the variable above that line the error dissappears?!
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

Sorry, i forgot to mention that I was talking about VC6. ghisler also uses vc6 to write c++ plugins.

Regards,
CoolWater
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Interesting, it compiles just fine with VC6 - it's the real source code. Please let me know if you had to make any other changes for VS 2008, and I will add them to my sources.
Author of Total Commander
https://www.ghisler.com
Post Reply