handle nulls in event_prefix and label_format in Monitor::Reload
This commit is contained in:
parent
45ee7284f5
commit
26cea49f1a
|
@ -1727,8 +1727,20 @@ void Monitor::Reload() {
|
|||
function = (Function)atoi(dbrow[index++]);
|
||||
enabled = atoi(dbrow[index++]);
|
||||
const char *p_linked_monitors = dbrow[index++];
|
||||
|
||||
if ( dbrow[index] ) {
|
||||
strncpy( event_prefix, dbrow[index++], sizeof(event_prefix)-1 );
|
||||
} else {
|
||||
event_prefix[0] = 0;
|
||||
index++;
|
||||
}
|
||||
if ( dbrow[index] ) {
|
||||
strncpy( label_format, dbrow[index++], sizeof(label_format)-1 );
|
||||
} else {
|
||||
label_format[0] = 0;
|
||||
index++;
|
||||
}
|
||||
|
||||
label_coord = Coord( atoi(dbrow[index]), atoi(dbrow[index+1]) ); index += 2;
|
||||
label_size = atoi(dbrow[index++]);
|
||||
warmup_count = atoi(dbrow[index++]);
|
||||
|
|
Loading…
Reference in New Issue