diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-05-18 11:44:11 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-05-18 15:11:04 +0300 |
commit | 10cabcdb6996d98073d16f7476c6057c3fb70dc7 (patch) | |
tree | 5a5a36b64af207147cfc2ac5557c1af6279ee6e9 /core | |
parent | 21bf811a57f999423b1d37ed753364dba2d2cb8b (diff) | |
download | subsurface-10cabcdb6996d98073d16f7476c6057c3fb70dc7.tar.gz |
Plannernotes: '\0'-terminate ICD-buffer
When creating the ICD-notes the membuffer was not '\0'-terminated,
leading to output of stale data.
Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r-- | core/plannernotes.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c index efd71b16c..cf5b682a3 100644 --- a/core/plannernotes.c +++ b/core/plannernotes.c @@ -524,6 +524,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d /* For trimix OC dives, if an icd table header and icd data were printed to buffer, then add the ICD table here */ if (!icdtableheader && prefs.show_icd) { put_string(&icdbuf, "</tbody></table>"); // End the ICD table + mb_cstring(&icdbuf); put_string(&buf, icdbuf.buffer); // ..and add it to the html buffer if (icdwarning) { // If necessary, add warning put_format(&buf, "<span style='color: red;'>%s</span> %s", |