use strncat(sizeof(...) - strlen(...) - 1)

This commit is contained in:
Mackerel
2022-09-03 00:11:03 -04:00
parent 95d4da4972
commit 2d8c05b4ed
2 changed files with 2 additions and 2 deletions

View File

@@ -1148,7 +1148,7 @@ int format_script(struct descriptor_data *d)
*line = '\0';
for (nlen = 0, i = 0;i<indent;i++) {
strncat(line, " ", sizeof(line)-1);
strncat(line, " ", sizeof(line) - strlen(line) - 1);
nlen += 2;
}