-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make newer compilers not complain about string truncations that are not broken. #122
Comments
Many of these format-truncation messages are triggered by snprintf() calls which will in fact truncate as desired. |
GCC quieted for cases where snprintf() truncates source strings.
The n+1 thing is not required. snprintf(…,n,...) prints at most n characters to the buffer, including the terminating null character. So the previous definition of "char fullPath[MAX_PATH];" etc was already sufficient. See:
|
It makes sense. C code all over the world would be leaking otherwise. |
Up to N chars are being copied into strings with less than N+1 chars of storage.
The text was updated successfully, but these errors were encountered: