Ignore:
Timestamp:
Aug 19, 1999, 2:53:19 PM (26 years ago)
Author:
sandervl
Message:

PE Resource changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winimgres.cpp

    r571 r576  
    1 /* $Id: winimgres.cpp,v 1.8 1999-08-19 10:25:27 sandervl Exp $ */
     1/* $Id: winimgres.cpp,v 1.9 1999-08-19 12:53:18 sandervl Exp $ */
    22
    33/*
     
    129129  }
    130130  if(pData == NULL) {
    131     dprintf(("getResource: res not found!\n"));
    132     return(NULL);
     131        dprintf(("getResource: res not found!\n"));
     132        return(NULL);
    133133  }
    134134
    135135  char *resdata = (char *)((char *)pResDir + pData->OffsetToData - pResSection->virtaddr);
    136136  if(stringid != -1) {//search for string in table
    137     USHORT *unicodestr = (USHORT *)resdata;
    138 
    139     for(i=0;i<stringid;i++) {
    140         unicodestr += *unicodestr;
    141     }
    142     res = new Win32Resource(this, id, NTRT_STRING, (ULONG)*unicodestr, (char *)unicodestr);
    143     if(res == NULL) {
    144         dprintf(("new Win32Resource failed!\n"));
    145         return(NULL);
    146     }
     137        USHORT *unicodestr = (USHORT *)resdata;
     138
     139        for(i=0;i<stringid;i++) {
     140                unicodestr += *unicodestr;
     141        }
     142        res = new Win32Resource(this, id, NTRT_STRING, (ULONG)*unicodestr, (char *)unicodestr);
     143        if(res == NULL) {
     144                dprintf(("new Win32Resource failed!\n"));
     145                return(NULL);
     146        }
    147147  }
    148148  else  res = new Win32Resource(this, id, type, pData->Size, resdata);
Note: See TracChangeset for help on using the changeset viewer.