mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Fix for standards compliance
This commit is contained in:
parent
c94e8e3194
commit
f951edbe35
@ -176,7 +176,7 @@ void EDE_Browser::sort(int column, SortType type, bool reverse) {
|
|||||||
// Start actually sorting
|
// Start actually sorting
|
||||||
if (type != NO_SORT) {
|
if (type != NO_SORT) {
|
||||||
// First create an array of strings in a given column
|
// First create an array of strings in a given column
|
||||||
char* sorttext[size()+1]; // index starts from 1 for simplicity in mqsort
|
char** sorttext = (char**)malloc(sizeof(char*)*(size()+1)); // index starts from 1 for simplicity in mqsort
|
||||||
for (int i=1;i<=size();i++) {
|
for (int i=1;i<=size();i++) {
|
||||||
char *tmp = strdup(text(i));
|
char *tmp = strdup(text(i));
|
||||||
char *l = tmp;
|
char *l = tmp;
|
||||||
@ -196,6 +196,7 @@ void EDE_Browser::sort(int column, SortType type, bool reverse) {
|
|||||||
|
|
||||||
// Free the allocated memory
|
// Free the allocated memory
|
||||||
for (int i=1; i<=size(); i++) free (sorttext[i]);
|
for (int i=1; i<=size(); i++) free (sorttext[i]);
|
||||||
|
free(sorttext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user