Changeset 2007 for trunk/src/kernel32/winres.cpp
- Timestamp:
- Dec 7, 1999, 1:28:41 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winres.cpp
r1885 r2007 1 /* $Id: winres.cpp,v 1.2 2 1999-11-30 14:15:55sandervl Exp $ */1 /* $Id: winres.cpp,v 1.23 1999-12-07 12:28:41 sandervl Exp $ */ 2 2 3 3 /* … … 71 71 this->type = type; 72 72 this->ressize = size; 73 winresdata = (char *)malloc(size );73 winresdata = (char *)malloc(size+sizeof(WCHAR)); //+2 for 0 terminator (string res) 74 74 if(winresdata == NULL) { 75 75 DebugInt3(); … … 79 79 80 80 if(type == NTRT_STRING) { 81 memcpy(winresdata, resdata, size-sizeof(WCHAR));82 ((USHORT *)winresdata)[size/sizeof(WCHAR)-1] = 0;81 memcpy(winresdata, resdata, size); 82 ((USHORT *)winresdata)[size/sizeof(WCHAR)] = 0; 83 83 } 84 84 else memcpy(winresdata, resdata, size);
Note:
See TracChangeset
for help on using the changeset viewer.