[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Patch: reducing amount of duplicate code

From: Dmitry <wipedout_at_yandex.ru>
Date: Tue, 08 Sep 2009 10:15:35 +0400

In r17132 a new member variable is introduced in CFormatMessageWrapper. Its interpretation is misleading - it's not HRESULT and therefore should not be used with S_ constants. I also suspect that it is misused - according to MSDN if FormatMessage() succeeds it returns the number of characters retrieved. It could be 14 for example. Then "result" is 14 after such call. operator bool() will compare "14" with "S_OK" (which is 0) and will return "false".



To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2009-09-08 09:02:30 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.