(svn r19134) -Fix (r16983, r17219): YAPF debug output was quite broken.

This commit is contained in:
frosch
2010-02-14 18:33:57 +00:00
parent d0122644af
commit 30b215a82b
3 changed files with 39 additions and 7 deletions

View File

@@ -109,7 +109,9 @@ bool DumpTarget::FindKnownName(size_t type_id, const void *ptr, CStrA &name)
void DumpTarget::WriteIndent()
{
int num_spaces = 2 * m_indent;
memset(m_out.GrowSizeNC(num_spaces), ' ', num_spaces);
if (num_spaces > 0) {
memset(m_out.GrowSizeNC(num_spaces), ' ', num_spaces);
}
}
/** Write a line with indent at the beginning and <LF> at the end. */
@@ -175,4 +177,4 @@ void DumpTarget::EndStruct()
}
/** Just to silence an unsilencable GCC 4.4+ warning */
/* static */ const CBlobBaseSimple::CHdr CBlobBaseSimple::hdrEmpty[] = {{0, 0}, {0, 0}};
/* static */ CBlobBaseSimple::CHdr CBlobBaseSimple::hdrEmpty[] = {{0, 0}, {0, 0}};