fix gcc warning "stringop-truncation"

This commit is contained in:
limymy
2023-12-07 14:36:29 +08:00
committed by GitHub
parent e4359c04df
commit 08c6233912
+1 -1
View File
@@ -62,7 +62,7 @@ static void makeLabel(const mjModel* m, mjtObj type, int id, char* label) {
}
// copy result into label
strncpy(label, txt, 99);
strncpy(label, txt, 100);
label[99] = '\0';
}