if( item==NULL || item==Top || item==Bottom )
{
#ifdef _DEBUG
- DebugPrintf("del in " __FILE__ ": retrning\n"
- "item is 0x%08x (Bottom is0x%08x)\n",
- item, Bottom);
+ DebugPrintf(_T("del in " __FILE__ ": retrning\n"
+ "item is 0x%08x (Bottom is0x%08x)\n"),
+ item, Bottom);
#endif
return;
/*allocte entry and string*/
tmp=malloc(sizeof(HIST_ENTRY));
- tmp->string=malloc(_tcslen(string)+1);
+ tmp->string=malloc((_tcslen(string)+1)*sizeof(TCHAR));
_tcscpy(tmp->string,string);
/*fill bottom with string, it will become Bottom->next*/
- Bottom->string=malloc(_tcslen(string)+1);
+ Bottom->string=malloc((_tcslen(string)+1)*sizeof(TCHAR));
_tcscpy(Bottom->string,string);
/*save Bottom value*/