diff options
author | Brian Paul <[email protected]> | 2010-07-13 07:44:35 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-07-13 07:44:35 -0600 |
commit | 672f6cdc19c5f89d85e20dc04bacb5a7905ff334 (patch) | |
tree | 366b1253b7ece7f6c2e1f4bacb957d26e8d7fa08 | |
parent | 56da2403fc1cb7f68a699dc6fd6c53f923dd3267 (diff) |
glapi: use _mesa_snprintf()
Note that the enums.c file is generated with this script.
This will preserve the change from commit
c4066b78c0aad41c199eb27157538c2ec9ab5bfd.
-rw-r--r-- | src/mapi/glapi/gen/gl_enums.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py index 644e0855229..0caa01030fa 100644 --- a/src/mapi/glapi/gen/gl_enums.py +++ b/src/mapi/glapi/gen/gl_enums.py @@ -105,7 +105,8 @@ const char *_mesa_lookup_enum_by_nr( int nr ) } else { /* this is not re-entrant safe, no big deal here */ - sprintf(token_tmp, "0x%x", nr); + _mesa_snprintf(token_tmp, sizeof(token_tmp) - 1, "0x%x", nr); + token_tmp[sizeof(token_tmp) - 1] = '\\0'; return token_tmp; } } |