diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-11-06 23:15:49 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-11-06 23:15:49 +0000 |
| commit | 8749d5a9ea25ba94ab50e6755d1b7033a8bb6004 (patch) | |
| tree | 17b4f63e065c6678cf112fd862c785d3e225b595 /src/tools | |
| parent | 009e4abb14cfcaecc0de8fab179adc7bd5feffd4 (diff) | |
Fix log head/tail functions.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_server.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc index bcd5c8df6..58310377c 100644 --- a/src/tools/dcpomatic_server.cc +++ b/src/tools/dcpomatic_server.cc @@ -47,12 +47,12 @@ public: return _log; } - string head_and_tail () const { - if (_log.size () < 2048) { + string head_and_tail (int amount = 1024) const { + if (_log.size () < (2 * amount)) { return _log; } - return _log.substr (0, 1024) + _log.substr (_log.size() - 1025, 1024); + return _log.substr (0, amount) + _log.substr (_log.size() - amount - 1, amount); } private: |
