Skip to content

Commit 4552cd5

Browse files
committed
Fix incorrectly checking if the Smart Heap text has been written
1 parent 788d958 commit 4552cd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ttyd-tools/rel/source/draw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4855,9 +4855,9 @@ void drawMemoryUsage()
48554855
if (DisplayHeapInfo[NumHeaps])
48564856
{
48574857
// Draw the used text
4858-
if (tempMemoryUsageBuffer[MemoryUsageCounter] != '\0')
4858+
uint32_t MemoryUsageBufferIndex = MemoryUsageCounter * MEMORY_USAGE_LINE_BUFFER_SIZE;
4859+
if (tempMemoryUsageBuffer[MemoryUsageBufferIndex] != '\0')
48594860
{
4860-
uint32_t MemoryUsageBufferIndex = MemoryUsageCounter * MEMORY_USAGE_LINE_BUFFER_SIZE;
48614861
drawText(&tempMemoryUsageBuffer[MemoryUsageBufferIndex], PosX, PosY, Alpha, Color, Scale);
48624862
}
48634863
}

0 commit comments

Comments
 (0)