We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem is the CpptrajFile::Printf buffer gets overrun. Need to either fix Printf or use Write instead.
CpptrajFile::Printf
Printf
Write
The text was updated successfully, but these errors were encountered:
This should work:
diff --git a/AmberTools/src/cpptraj/src/Cpptraj.cpp b/AmberTools/src/cpptraj/src/Cpptraj.cpp index f6857fab2f..5d94b8dacb 100644 --- a/AmberTools/src/cpptraj/src/Cpptraj.cpp +++ b/AmberTools/src/cpptraj/src/Cpptraj.cpp @@ -650,8 +650,11 @@ int Cpptraj::Interactive() { if (logfile_.IsOpen()) { // Write logfile header entry: date, cmd line opts, topologies logfile_.Printf("# %s\n", TimeString().c_str()); - if (!commandLine_.empty()) - logfile_.Printf("# Args: %s\n", commandLine_.c_str()); + if (!commandLine_.empty()) { + logfile_.Printf("# Args: "); + logfile_.Write(commandLine_.c_str(), commandLine_.size()); + logfile_.Printf("\n"); + } DataSetList tops = State_.DSL().GetSetsOfType("*", DataSet::TOPOLOGY); if (!tops.empty()) { logfile_.Printf("# Loaded topologies:\n");
Sorry, something went wrong.
Fixed by #959
drroe
No branches or pull requests
Problem is the
CpptrajFile::Printf
buffer gets overrun. Need to either fixPrintf
or useWrite
instead.The text was updated successfully, but these errors were encountered: