summaryrefslogtreecommitdiff
path: root/src/misc/dbg_helpers.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-02-14 18:33:57 +0000
committerfrosch <frosch@openttd.org>2010-02-14 18:33:57 +0000
commit30b215a82b8a7272d28898df83b70e254cd04c6d (patch)
tree1299697ec19e1b013d301cf9a252b623bcba3cb7 /src/misc/dbg_helpers.cpp
parentd0122644afc79b163c3727fa3d382fd6c7cdc774 (diff)
downloadopenttd-30b215a82b8a7272d28898df83b70e254cd04c6d.tar.xz
(svn r19134) -Fix (r16983, r17219): YAPF debug output was quite broken.
Diffstat (limited to 'src/misc/dbg_helpers.cpp')
-rw-r--r--src/misc/dbg_helpers.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/misc/dbg_helpers.cpp b/src/misc/dbg_helpers.cpp
index 6a98680dc..c6018f0ec 100644
--- a/src/misc/dbg_helpers.cpp
+++ b/src/misc/dbg_helpers.cpp
@@ -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}};