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

bug in ResText with DLGTEMPLATE

From: <vss2svn_at_nogga.de>
Date: 2006-02-03 20:26:31 CET

Hi,

there is a small bug in the ResText utility that prevents DLGTEMPLATE to
be converted correctly.

The definition of the DLGTEMPLATE structure (taken from the MSDN) is:

typedef struct {
    DWORD style;
    DWORD dwExtendedStyle;
    WORD cdit;
    short x;
    short y;
    short cx;
    short cy;
} DLGTEMPLATE, *LPDLGTEMPLATE;

and the style parameter was already parsed in the
CountMemReplaceDialogResource. The original code tried to reparse the
style parameter after the dwExtendedStyle parameter.

I encountered the bug when I tried to modify a resource DLL that was
build with Visual Studio 6. But I do not expect that the definition of
the structure has changed in Visual Studio 7.1.

Best regards
Dirk

Index: C:/src/tortoiseSVN/src/ResText/ResModule.cpp
===================================================================
--- C:/src/tortoiseSVN/src/ResText/ResModule.cpp (revision 5619)
+++ C:/src/tortoiseSVN/src/ResText/ResModule.cpp (working copy)
@@ -959,15 +959,15 @@
         {
             newDialog[(*wordcount)++] = GET_WORD(res++); //exStyle
             newDialog[(*wordcount)++] = GET_WORD(res++); //exStyle
- style = GET_DWORD(res);
- newDialog[(*wordcount)++] = GET_WORD(res++); //style
- newDialog[(*wordcount)++] = GET_WORD(res++); //style
+// style = GET_DWORD(res);
+// newDialog[(*wordcount)++] = GET_WORD(res++); //style
+// newDialog[(*wordcount)++] = GET_WORD(res++); //style
         } // if (newDialog)
         else
         {
- res += 4;
- style = GET_DWORD(res);
- (*wordcount) += 4;
+ res += 2;
+// style = GET_DWORD(res);
+ (*wordcount) += 2;
         }
     }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Fri Feb 3 20:35:26 2006

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

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