1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

ostctools: avoid string copy

Found by Coverity.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-08-14 09:40:55 +02:00 committed by Michael Keller
parent 1578c7be99
commit 92abfb4b90

View file

@ -150,8 +150,7 @@ void ostctools_import(const char *file, struct divelog *log)
report_error(translate("gettextFromC", "Unknown DC in dive %d"), ostcdive->number);
return;
}
std::string tmp = devdata.vendor + " " + devdata.model + " (Imported from OSTCTools)";
ostcdive->dcs[0].model = tmp;
ostcdive->dcs[0].model = devdata.vendor + " " + devdata.model + " (Imported from OSTCTools)";
// Parse the dive data
rc = libdc_buffer_parser(ostcdive.get(), &devdata, buffer.data(), i + 1);