diff options
Diffstat (limited to 'src/mapi/glapi/gen/gl_enums.py')
-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; } } |