mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:52:08 +02:00
FFvaluestore: fix UB reported by clang
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
typedef char KeyType[33]; //32 byte key + \0
|
||||
typedef char KeyType[32]; //31 byte key + \0
|
||||
|
||||
void ffValuestoreInit(FFvaluestore* vs, uint32_t valueSize)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ typedef FFlist FFvaluestore;
|
||||
|
||||
void ffValuestoreInit(FFvaluestore* vs, uint32_t valueSize);
|
||||
FF_C_NODISCARD void* ffValuestoreGet(FFvaluestore* vs, const char* key);
|
||||
void* ffValuestoreSet(FFvaluestore* vs, const char* key, bool* created); //created may be NULL
|
||||
FF_C_NODISCARD void* ffValuestoreSet(FFvaluestore* vs, const char* key, bool* created); //created may be NULL
|
||||
void ffValuestoreDestroy(FFvaluestore* vs);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user