mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
21bf811a57
commit
10cabcdb69
1 changed files with 1 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue