summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/memorymanager.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/resources/memorymanager.cpp b/src/resources/memorymanager.cpp
index 2da7c0908..4a14a5e73 100644
--- a/src/resources/memorymanager.cpp
+++ b/src/resources/memorymanager.cpp
@@ -61,12 +61,22 @@ void MemoryManager::printMemory(const std::string &name,
const int childsSum)
{
std::string str(level, ' ');
- logger->log("%s%s: %d = %d + %d",
- str.c_str(),
- name.c_str(),
- localSum + childsSum,
- localSum,
- childsSum);
+ if (childsSum > 0)
+ {
+ logger->log("%s%s: %d = %d + %d",
+ str.c_str(),
+ name.c_str(),
+ localSum + childsSum,
+ localSum,
+ childsSum);
+ }
+ else
+ {
+ logger->log("%s%s: %d",
+ str.c_str(),
+ name.c_str(),
+ localSum);
+ }
}
void MemoryManager::printAllMemory(ChatTab *const tab A_DYECMD_UNUSED)