summaryrefslogtreecommitdiffstats
path: root/source/cWebAdmin.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-01 14:43:47 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-01 14:43:47 +0100
commit2568bad3cc1ae70350f5ad31e97b4c13194e437e (patch)
tree31d0713dfe1b4e42c1f17ddae8ea0114c420fc61 /source/cWebAdmin.cpp
parentRemoved a few duplicate includes (diff)
downloadcuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.gz
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.bz2
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.lz
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.xz
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.tar.zst
cuberite-2568bad3cc1ae70350f5ad31e97b4c13194e437e.zip
Diffstat (limited to '')
-rw-r--r--source/cWebAdmin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/cWebAdmin.cpp b/source/cWebAdmin.cpp
index ff4ef8a96..9707d3158 100644
--- a/source/cWebAdmin.cpp
+++ b/source/cWebAdmin.cpp
@@ -224,18 +224,18 @@ void cWebAdmin::Request_Handler(webserver::http_request* r)
}
else
{
- char MemUsage[32];
- sprintf( MemUsage, "%0.2f", ((double)resource_usage.ru_maxrss / 1024 / 1024) );
- ReplaceString( Template, std::string("{MEM}"), MemUsage );
+ AString MemUsage;
+ Printf(MemUsage, "%0.2f", ((double)resource_usage.ru_maxrss / 1024 / 1024) );
+ ReplaceString(Template, std::string("{MEM}"), MemUsage);
}
#else
HANDLE hProcess = GetCurrentProcess();
PROCESS_MEMORY_COUNTERS pmc;
if( GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc) ) )
{
- char MemUsage[32];
- sprintf( MemUsage, "%0.2f", (pmc.WorkingSetSize / 1024.f / 1024.f) );
- ReplaceString( Template, std::string("{MEM}"), MemUsage );
+ AString MemUsage;
+ Printf(MemUsage, "%0.2f", (pmc.WorkingSetSize / 1024.f / 1024.f) );
+ ReplaceString( Template, "{MEM}", MemUsage );
}
#endif
// end mem usage