fix confstr return value
per the specification, the terminating null byte is counted.
This commit is contained in:
parent
dab441aea2
commit
0a8d98285f
1 changed files with 1 additions and 1 deletions
|
|
@ -13,5 +13,5 @@ size_t confstr(int name, char *buf, size_t len)
|
|||
}
|
||||
// snprintf is overkill but avoid wasting code size to implement
|
||||
// this completely useless function and its truncation semantics
|
||||
return snprintf(buf, len, "%s", s);
|
||||
return snprintf(buf, len, "%s", s) + 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue