mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
support for more than 5 batteries
This commit is contained in:
+4
-1
@@ -24,7 +24,10 @@ void* ffListGet(FFlist* list, uint32_t index)
|
||||
void* ffListAdd(FFlist* list)
|
||||
{
|
||||
if(list->length == list->capacity)
|
||||
list->data = realloc(list->data, list->capacity * 2 * list->elementSize);
|
||||
{
|
||||
list->capacity = list->capacity * 2 * list->elementSize;
|
||||
list->data = realloc(list->data, list->capacity);
|
||||
}
|
||||
void* adress = list->data + (list->length * list->elementSize);
|
||||
++list->length;
|
||||
return adress;
|
||||
|
||||
Reference in New Issue
Block a user