Skip to content

Commit fed3209

Browse files
author
larryhou
committed
Print raw bytes with hex format
1 parent 4fb8c90 commit fed3209

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

MemoryCrawler/MemoryCrawler/Crawler/crawler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,10 +1141,10 @@ void MemorySnapshotCrawler::dumpNObjectHierarchy(PackedNativeUnityEngineObject *
11411141
{
11421142
auto __size = strlen(indent);
11431143
char __indent[__size + 2*3 + 1]; // indent + 2×tabulator + \0
1144+
memset(__indent, 0, sizeof(__indent));
11441145
memcpy(__indent, indent, __size);
11451146
char *tabular = __indent + __size;
11461147
memcpy(tabular + 3, "", 3);
1147-
tabular[6] = 0;
11481148

11491149
if (__depth == 0)
11501150
{
@@ -1202,10 +1202,10 @@ void MemorySnapshotCrawler::dumpMObjectHierarchy(address_t address, TypeDescript
12021202
{
12031203
auto __size = strlen(indent);
12041204
char __indent[__size + 2*3 + 1]; // indent + 2×tabulator + \0
1205+
memset(__indent, 0, sizeof(__indent));
12051206
memcpy(__indent, indent, __size);
12061207
char *tabular = __indent + __size;
12071208
memcpy(tabular + 3, "", 3);
1208-
tabular[6] = 0;
12091209

12101210
if (type == nullptr || (!type->isValueType && !isActualType))
12111211
{

0 commit comments

Comments
 (0)