diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-02-24 18:02:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-24 18:02:49 +0100 |
| commit | de795b3e103309210dac9e331d45aacf0f0d884c (patch) | |
| tree | cb1679edba6f292665bfa10f673f2aed6efb4986 /src/lib/config.cc | |
| parent | c003df64136806705d7662a885ada028a2ba3032 (diff) | |
Fix config.xml corruption when it contains multi-byte UTF8 characters.
Diffstat (limited to 'src/lib/config.cc')
| -rw-r--r-- | src/lib/config.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index d38256673..cc9bd6ffd 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -984,7 +984,7 @@ Config::write_config () const if (!f) { throw FileError (_("Could not open file for writing"), tmp); } - checked_fwrite (s.c_str(), s.length(), f, tmp); + checked_fwrite (s.c_str(), s.bytes(), f, tmp); fclose (f); boost::filesystem::remove (config_file()); boost::filesystem::rename (tmp, config_file()); |
