Some side tracking fixing undefined behaviour and memory vulnurabilities

This commit is contained in:
2023-12-03 13:20:30 +01:00
parent 28308dccad
commit 09a2e621d6
8 changed files with 69 additions and 42 deletions

View File

@@ -91,7 +91,7 @@ int PtouchPrint::run() {
"Found more than one device of the same printer on bus. Currently not supported");
return -1;
}
printer->attachUsbDevice(devices[0]);
printer->attachUsbDevice(std::move(devices[0]));
auto status = printer->getPrinterStatus();
spdlog::info("Detected tape width is {}mm", status.tapeWidthMm);
auto bm = ptprnt::graphics::Bitmap<ptprnt::graphics::ALPHA8>(512, 128);