ref: cd65e9dae04c4473c3e979fdc6a6319cb56d2051
parent: 4c069fef88660e494fb1d15f8d1475087bd06308
author: Turo Lamminen <[email protected]>
date: Tue Mar 20 15:01:49 EDT 2018
textscreen: Fix constness issue in TXT_SelectFile
--- a/textscreen/txt_fileselect.c
+++ b/textscreen/txt_fileselect.c
@@ -621,8 +621,8 @@
}
argv = calloc(5 + NumExtensions(extensions), sizeof(char *));
- argv[0] = ZENITY_BINARY;
- argv[1] = "--file-selection";
+ argv[0] = strdup(ZENITY_BINARY);
+ argv[1] = strdup("--file-selection");
argc = 2;
if (window_title != NULL)
@@ -662,7 +662,7 @@
result = ExecReadOutput(argv);
- for (i = 2; i < argc; ++i)
+ for (i = 0; i < argc; ++i)
{
free(argv[i]);
}