mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-30 22:45:21 -04:00
[togo] enable selection of Windows version
* Closes #847 * Also set rufus-next to 2.12
This commit is contained in:
parent
5113be0a39
commit
7d302d340f
15 changed files with 349 additions and 78 deletions
|
@ -348,10 +348,10 @@ void StrArrayCreate(StrArray* arr, uint32_t initial_size)
|
|||
uprintf("Could not allocate string array\n");
|
||||
}
|
||||
|
||||
int32_t StrArrayAdd(StrArray* arr, const char* str)
|
||||
int32_t StrArrayAdd(StrArray* arr, const char* str, BOOL duplicate)
|
||||
{
|
||||
char** old_table;
|
||||
if ((arr == NULL) || (arr->String == NULL))
|
||||
if ((arr == NULL) || (arr->String == NULL) || (str == NULL))
|
||||
return -1;
|
||||
if (arr->Index == arr->Max) {
|
||||
arr->Max *= 2;
|
||||
|
@ -363,7 +363,7 @@ int32_t StrArrayAdd(StrArray* arr, const char* str)
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
arr->String[arr->Index] = safe_strdup(str);
|
||||
arr->String[arr->Index] = (duplicate)?safe_strdup(str):(char*)str;
|
||||
if (arr->String[arr->Index] == NULL) {
|
||||
uprintf("Could not store string in array\n");
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue