Changeset 21916 for trunk/src/kernel32/winimgres.cpp
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/kernel32/winimgres.cpp
r10471 r21916 26 26 27 27 #include <misc.h> 28 #include <winimagebase.h>28 #include "winimagebase.h" 29 29 #include <unicode.h> 30 30 #include <heapstring.h> … … 37 37 #define MAX_RES 17 38 38 typedef struct { 39 c har *typename;40 int 39 const char *typenam; 40 int namelen; 41 41 } STD_RESTYPE; 42 42 … … 131 131 typelen = strlen(lpszType); 132 132 133 for(int i=0;i<MAX_RES;i++) { 133 int i; 134 for(i=0;i<MAX_RES;i++) { 134 135 if(ResType[i].namelen && 135 136 ResType[i].namelen == typelen && 136 stricmp(lpszType, ResType[i].typenam e) == 0)137 stricmp(lpszType, ResType[i].typenam) == 0) 137 138 break; 138 139 } … … 186 187 typelen = strlen(astring1); 187 188 188 for(int i=0;i<MAX_RES;i++) { 189 int i; 190 for(i=0;i<MAX_RES;i++) { 189 191 if(ResType[i].namelen && 190 192 ResType[i].namelen == typelen && 191 stricmp(astring1, ResType[i].typenam e) == 0)193 stricmp(astring1, ResType[i].typenam) == 0) 192 194 break; 193 195 } … … 603 605 pstring = (PIMAGE_RESOURCE_DIR_STRING_U)((ULONG)pResRootDir + nameOffset); 604 606 int len = lstrlenWtoA( pstring->NameString, pstring->Length ); 605 char *typenam e= (char *)malloc( len + 1 );606 lstrcpynWtoA(typenam e, pstring->NameString, len + 1 );607 typenam e[len] = 0;608 609 fRet = lpEnumFunc(hmod, typenam e, lParam);610 free(typenam e);607 char *typenam = (char *)malloc( len + 1 ); 608 lstrcpynWtoA(typenam, pstring->NameString, len + 1 ); 609 typenam[len] = 0; 610 611 fRet = lpEnumFunc(hmod, typenam, lParam); 612 free(typenam); 611 613 } 612 614 else {
Note:
See TracChangeset
for help on using the changeset viewer.