Changeset 4185 for trunk/console

Show
Ignore:
Timestamp:
08/13/05 10:40:35 (3 years ago)
Author:
phatfil
Message:

whoops. use strdup() so free() works.

Location:
trunk/console/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/console/src/console.cpp

    r4184 r4185  
    17711771  char *szFrom; 
    17721772  if (gUserManager.FindOwner(szId, nPPID)) 
    1773     szFrom = "Server\0"; 
     1773    szFrom = strdup("Server"); 
    17741774  else 
    17751775    szFrom = strdup(u->GetAlias()); 
  • trunk/console/src/console_print.cpp

    r4184 r4185  
    151151      winMain->sLastContact.nPPID, LOCK_R); 
    152152    if (u == NULL) 
    153       szLastUser = "<Removed>\0"; 
     153      szLastUser = strdup("<Removed>"); 
    154154    else 
    155155    { 
     
    159159  } 
    160160  else 
    161     szLastUser = "<None>\0"; 
     161    szLastUser = strdup("<None>"); 
    162162 
    163163  o = gUserManager.FetchOwner(LOCK_R); 
     
    181181  wclrtoeol(winStatus->Win()); 
    182182  winStatus->RefreshWin(); 
     183  free(szLastUser); 
    183184} 
    184185