fixed a stupid bug in history
authorPaolo Pantaleo <paolopan@freemail.it>
Wed, 8 Dec 1999 18:18:23 +0000 (18:18 +0000)
committerPaolo Pantaleo <paolopan@freemail.it>
Wed, 8 Dec 1999 18:18:23 +0000 (18:18 +0000)
minor chage to GetConsoleHandle

svn path=/trunk/; revision=839

rosapps/cmd/history.c
rosapps/cmd/misc.c

index 2ba9479..9c22f41 100644 (file)
@@ -159,8 +159,8 @@ VOID add_at_bottom(LPTSTR string)
 
 
                
-               /*fill bottom with string*/
-               Bottom->string=malloc(_tclen(string));
+               /*fill bottom with string*/             
+               Bottom->string=malloc(_tcslen(string)+1);
                _tcscpy(Bottom->string,string);         
 
                /*save Bottom value*/
index ffe3b95..2ec2659 100644 (file)
@@ -306,6 +306,9 @@ HWND GetConsoleWindow (VOID)
        TCHAR temp[256];
        HWND h=0;
 
+       if(h)
+               return h;
+
        GetConsoleTitle (original, sizeof(original));
 
        _tcscpy (temp, original);