use statuc const char for v variable

This commit is contained in:
BONNAURE Olivier 2024-04-12 15:48:16 +02:00
parent fab02d9e5f
commit dc5c795df3

View file

@ -830,12 +830,11 @@ int LuaVisualizeControlCodes(lua_State *L) {
}
int LuaUuidV4(lua_State *L) {
char v[] = {'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
static const char v[] = {'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
char uuid_str[37] = {0};
uint64_t r = _rand();
uint64_t r = _rand64();
for (int i = 0, j = 0; i < 36; ++i, ++j) {
if (j == 16) {
r = _rand64();
j = 0;