Changeset 4184 for trunk/console
- Timestamp:
- 08/13/05 10:32:14 (3 years ago)
- Location:
- trunk/console/src
- Files:
-
- 2 modified
-
console.cpp (modified) (7 diffs)
-
console_print.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/console/src/console.cpp
r4175 r4184 1769 1769 return; 1770 1770 } 1771 char szFrom[32];1771 char *szFrom; 1772 1772 if (gUserManager.FindOwner(szId, nPPID)) 1773 s trcpy(szFrom, "Server");1773 szFrom = "Server\0"; 1774 1774 else 1775 s trcpy(szFrom,u->GetAlias());1775 szFrom = strdup(u->GetAlias()); 1776 1776 gUserManager.DropUser(u); 1777 1777 … … 1791 1791 winMain->wprintf("%CNo System Events.\n", 8); 1792 1792 } 1793 free(szFrom); 1793 1794 return; 1794 1795 } … … 1807 1808 winMain->wprintf("%CInvalid start range: %A%s\n", 16, 1808 1809 A_BOLD, szStart); 1810 free(szFrom); 1809 1811 return; 1810 1812 } … … 1813 1815 winMain->wprintf("%CStart value out of range, history contains %d events.\n", 1814 1816 16, nLast); 1817 free(szFrom); 1815 1818 return; 1816 1819 } … … 1823 1826 winMain->wprintf("%CInvalid end range: %A%s\n", 16, 1824 1827 A_BOLD, szEnd); 1828 free(szFrom); 1825 1829 return; 1826 1830 } … … 1829 1833 winMain->wprintf("%CEnd value out of range, history contains %d events.\n", 1830 1834 16, nLast); 1835 free(szFrom); 1831 1836 return; 1832 1837 } … … 1839 1844 winMain->nLastHistory = nEnd; 1840 1845 PrintHistory(lHistory, nStart - 1, nEnd - 1, szFrom); 1846 free(szFrom); 1841 1847 } 1842 1848 -
trunk/console/src/console_print.cpp
r4023 r4184 126 126 { 127 127 static char szMsgStr[16]; 128 static char szLastUser[32];128 static char *szLastUser; 129 129 130 130 werase(winStatus->Win()); … … 151 151 winMain->sLastContact.nPPID, LOCK_R); 152 152 if (u == NULL) 153 s trcpy(szLastUser, "<Removed>");153 szLastUser = "<Removed>\0"; 154 154 else 155 155 { 156 s trcpy(szLastUser,u->GetAlias());156 szLastUser = strdup(u->GetAlias()); 157 157 gUserManager.DropUser(u); 158 158 } 159 159 } 160 160 else 161 s trcpy(szLastUser, "<None>");161 szLastUser = "<None>\0"; 162 162 163 163 o = gUserManager.FetchOwner(LOCK_R);
