Ignore:
Timestamp:
Dec 9, 1999, 1:52:21 AM (26 years ago)
Author:
sandervl
Message:

code heap added + changed back winres fix (breaks Notes) + heapstring fixes

File:
1 edited

Legend:

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

    r2007 r2032  
    1 /* $Id: winres.cpp,v 1.23 1999-12-07 12:28:41 sandervl Exp $ */
     1/* $Id: winres.cpp,v 1.24 1999-12-09 00:52:21 sandervl Exp $ */
    22
    33/*
     
    7171  this->type     = type;
    7272  this->ressize  = size;
    73   winresdata     = (char *)malloc(size+sizeof(WCHAR)); //+2 for 0 terminator (string res)
     73  winresdata     = (char *)malloc(size+sizeof(WCHAR));
    7474  if(winresdata == NULL) {
    7575    DebugInt3();
     
    8080  if(type == NTRT_STRING) {
    8181        memcpy(winresdata, resdata, size);
    82         ((USHORT *)winresdata)[size/sizeof(WCHAR)] = 0;
     82        ((USHORT *)winresdata)[size/sizeof(WCHAR)-1] = 0;
    8383  }
    8484  else  memcpy(winresdata, resdata, size);
Note: See TracChangeset for help on using the changeset viewer.