fix gcc warning "stringop-truncation"
This commit is contained in:
@@ -62,7 +62,7 @@ static void makeLabel(const mjModel* m, mjtObj type, int id, char* label) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// copy result into label
|
// copy result into label
|
||||||
strncpy(label, txt, 99);
|
strncpy(label, txt, 100);
|
||||||
label[99] = '\0';
|
label[99] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user