Fix %u instead of %d for id which is unsigned. Pass string instead of c_str

pull/3530/head
Isaac Connor 2022-07-14 12:07:26 -04:00
parent 9db65f5c5f
commit d0ca677207
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ void Zone::Setup(
diag_path = stringtf("%s/diagpipe-%d-poly.jpg", diag_path = stringtf("%s/diagpipe-%d-poly.jpg",
staticConfig.PATH_SOCKS.c_str(), id); staticConfig.PATH_SOCKS.c_str(), id);
Fifo::fifo_create_if_missing(diag_path.c_str()); Fifo::fifo_create_if_missing(diag_path);
} else { } else {
diag_path = stringtf("%s/diag-%d-poly.jpg", diag_path = stringtf("%s/diag-%d-poly.jpg",
monitor->getStorage()->Path(), id); monitor->getStorage()->Path(), id);
@ -937,7 +937,7 @@ std::vector<Zone> Zone::Load(const std::shared_ptr<Monitor> &monitor) {
bool Zone::DumpSettings(char *output, bool /*verbose*/) const { bool Zone::DumpSettings(char *output, bool /*verbose*/) const {
output[0] = 0; output[0] = 0;
sprintf(output+strlen(output), " Id : %d\n", id ); sprintf(output+strlen(output), " Id : %u\n", id );
sprintf(output+strlen(output), " Label : %s\n", label.c_str() ); sprintf(output+strlen(output), " Label : %s\n", label.c_str() );
sprintf(output+strlen(output), " Type: %d - %s\n", type, sprintf(output+strlen(output), " Type: %d - %s\n", type,
type==ACTIVE?"Active":( type==ACTIVE?"Active":(