From f951edbe35dd5e5f880f8f5e55bf79cf2c871645 Mon Sep 17 00:00:00 2001 From: Vedran Ljubovic Date: Fri, 3 Aug 2007 12:35:50 +0000 Subject: [PATCH] Fix for standards compliance --- efiler/EDE_Browser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/efiler/EDE_Browser.cpp b/efiler/EDE_Browser.cpp index 1e6a80d..e3a3262 100644 --- a/efiler/EDE_Browser.cpp +++ b/efiler/EDE_Browser.cpp @@ -176,7 +176,7 @@ void EDE_Browser::sort(int column, SortType type, bool reverse) { // Start actually sorting if (type != NO_SORT) { // 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++) { char *tmp = strdup(text(i)); char *l = tmp; @@ -196,6 +196,7 @@ void EDE_Browser::sort(int column, SortType type, bool reverse) { // Free the allocated memory for (int i=1; i<=size(); i++) free (sorttext[i]); + free(sorttext); } }