This fixes a compiler warning with stringop-truncation:
```
error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
286 | strncpy(s, msg, MAX_DEBUG_MESSAGE_LENGTH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>
/* limit the message to fit within KHR_debug buffers */
char s[MAX_DEBUG_MESSAGE_LENGTH];
- strncpy(s, msg, MAX_DEBUG_MESSAGE_LENGTH);
+ strncpy(s, msg, MAX_DEBUG_MESSAGE_LENGTH - 1);
s[MAX_DEBUG_MESSAGE_LENGTH - 1] = '\0';
len = MAX_DEBUG_MESSAGE_LENGTH - 1;
_mesa_log_msg(ctx, source, type, *id, severity, len, s);