Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix up indentation in config writing

This accidentally caused null bytes to be written to the config.

Signed-off-by: Uli Schlachter <psychon@znc.in>
  • Loading branch information...
commit 2513149b42cbbb203adb28492b3576964ed05f8c 1 parent 26368a6
@psychon psychon authored
Showing with 2 additions and 1 deletion.
  1. +1 −1  Config.cpp
  2. +1 −0  ZNCString.h
View
2  Config.cpp
@@ -171,7 +171,7 @@ bool CConfig::Parse(CFile& file, CString& sErrorMsg)
}
void CConfig::Write(CFile *pFile, unsigned int iIndentation) {
- CString sIndentation = CString(" ", iIndentation);
+ CString sIndentation = CString(iIndentation, '\t');
for (EntryMapIterator it = m_ConfigEntries.begin(); it != m_ConfigEntries.end(); ++it) {
for (VCString::const_iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) {
View
1  ZNCString.h
@@ -89,6 +89,7 @@ class CString : public string {
CString(const char* c) : string(c) {}
CString(const char* c, size_t l) : string(c, l) {}
CString(const string& s) : string(s) {}
+ CString(size_t n, char c) : string(n, c) {}
~CString() {}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.