REGRESSION: incorrect fill range for ensight writeString

- introduced by b76595df42, only affects recent develop
This commit is contained in:
Mark Olesen
2023-10-13 14:20:59 +02:00
parent fc9fb5c150
commit c65fac192e

View File

@ -156,7 +156,7 @@ Foam::Ostream& Foam::ensightFile::writeString(const char* str, size_t len)
// TBD: truncate at newline? (shouldn't really occur anyhow)
std::copy_n(str, len, buf);
std::fill_n(buf + len, (len - 80), '\0'); // Pad trailing with nul
std::fill_n(buf + len, (80 - len), '\0'); // Pad trailing with nul
if (format() == IOstreamOption::BINARY)
{