[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Only one data file allowed in GLPK
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Only one data file allowed in GLPK |
Date: |
Sun, 28 Sep 2008 21:47:14 +0400 |
To fix the bug reported by Xypron please apply the patch below.
Note that the bug will be fixed in the next release of the package.
*** glpk-4.31/src/glpmpl03.c Tue Sep 2 12:00:00 2008
--- glpk-4.32/src/glpmpl03.c Thu Sep 28 12:00:00 2008
***************
*** 4895,4900 ****
--- 4895,4903 ----
for (arg = tab->arg; arg != NULL; arg = arg->next)
dca->na++;
dca->arg = xcalloc(1+dca->na, sizeof(char *));
+ #if 1 /* 28/IX-2008 */
+ for (k = 1; k <= dca->na; k++) dca->arg[k] = NULL;
+ #endif
/* evaluate argument values */
k = 0;
for (arg = tab->arg; arg != NULL; arg = arg->next)
***************
*** 5088,5093 ****
--- 5091,5099 ----
mpl_tab_drv_close(mpl);
if (dca->arg != NULL)
{ for (k = 1; k <= dca->na; k++)
+ #if 1 /* 28/IX-2008 */
+ if (dca->arg[k] != NULL)
+ #endif
xfree(dca->arg[k]);
xfree(dca->arg);
}