git://git.jankratochvil.net
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update for HEAD-2003091401
[reactos.git]
/
subsys
/
system
/
cmd
/
history.c
diff --git
a/subsys/system/cmd/history.c
b/subsys/system/cmd/history.c
index
948ca9d
..
caf396b
100644
(file)
--- a/
subsys/system/cmd/history.c
+++ b/
subsys/system/cmd/history.c
@@
-217,9
+217,9
@@
VOID del(LPHIST_ENTRY item)
if( item==NULL || item==Top || item==Bottom )
{
#ifdef _DEBUG
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;
#endif
return;
@@
-267,7
+267,7
@@
VOID add_before_last(LPTSTR string)
/*allocte entry and string*/
tmp=malloc(sizeof(HIST_ENTRY));
/*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);
_tcscpy(tmp->string,string);
@@
-320,7
+320,7
@@
VOID add_at_bottom(LPTSTR string)
/*fill bottom with string, it will become Bottom->next*/
/*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*/
_tcscpy(Bottom->string,string);
/*save Bottom value*/