aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/textstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/ApiExtractor/textstream.h')
-rw-r--r--sources/shiboken6/ApiExtractor/textstream.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/textstream.h b/sources/shiboken6/ApiExtractor/textstream.h
index 3e66fbf12..3744408b5 100644
--- a/sources/shiboken6/ApiExtractor/textstream.h
+++ b/sources/shiboken6/ApiExtractor/textstream.h
@@ -170,7 +170,7 @@ public:
const auto oldPos = s.pos();
s << m_value;
// Ensure something is written when an empty string is encountered
- if (oldPos == s.pos())
+ if (oldPos == s.pos() && m_fieldWidth > 0)
s << ' ';
s.setFieldAlignment(oldFieldAlignment);
s.setFieldWidth(oldFieldWidth);