From ac8dba2a80e3cccf7f759d35c468a5180843ad99 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 27 Jan 2015 23:03:12 +0100 Subject: [PATCH] Cleaned up text/uri-list parsing. --- src/x11_window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/x11_window.c b/src/x11_window.c index 0380b581..af73fdbd 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -183,6 +183,7 @@ static void changeWindowState(_GLFWwindow* window, Atom state, int action) } // Splits and translates a text/uri-list into separate file paths +// NOTE: This function destroys the provided string // static char** parseUriList(char* text, int* count) { @@ -196,7 +197,7 @@ static char** parseUriList(char* text, int* count) { text = NULL; - if (*line == '#') + if (line[0] == '#') continue; if (strncmp(line, prefix, strlen(prefix)) == 0)