diff options
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index a32249000..5e7ef67ca 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -723,7 +723,9 @@ void ServerConfig::Read(bool bail, userrec* user) case DT_CHARPTR: { ValueContainerChar* vcc = (ValueContainerChar*)Values[Index].val; - vcc->Set(vi.GetString(), strlen(vi.GetString())); + /* We do this so that an empty string can still be copied */ + size_t length = strlen(vi.GetString()); + vcc->Set(vi.GetString(), length ? length : 1); } break; case DT_INTEGER: |