mesa/main: do not copy the exact size of the string
authorCorentin Noël <corentin.noel@collabora.com>
Thu, 15 Sep 2022 12:49:22 +0000 (14:49 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 30 Sep 2022 12:38:11 +0000 (12:38 +0000)
commit9718c88bafe87a87b143de1e00b8d1ef8ffe4e48
tree9e5797c93b09f783854a153db1d981c72b655f7a
parent2cdb3e4b6b6d8f6dfdb5de7a12ac6239a0047464
mesa/main: do not copy the exact size of the string

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>
src/mesa/main/errors.c