From 1a3fb3e8b1ef1e43adb4e082c09a10caad805880 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 7 May 2018 14:08:33 +0200 Subject: Fix wrong comparison of drop target URI on X11 Need to compare, NOT to override passed file name. --- intern/ghost/intern/GHOST_DropTargetX11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/ghost') diff --git a/intern/ghost/intern/GHOST_DropTargetX11.cpp b/intern/ghost/intern/GHOST_DropTargetX11.cpp index 0efc8a78df5..30ab843c593 100644 --- a/intern/ghost/intern/GHOST_DropTargetX11.cpp +++ b/intern/ghost/intern/GHOST_DropTargetX11.cpp @@ -192,7 +192,7 @@ void GHOST_DropTargetX11::UrlDecode(char *decodedOut, int bufferSize, const char char *GHOST_DropTargetX11::FileUrlDecode(char *fileUrl) { - if (strncpy(fileUrl, "file://", 7) != 0) { + if (strncmp(fileUrl, "file://", 7) == 0) { /* assume one character of encoded URL can be expanded to 4 chars max */ int decodedSize = 4 * strlen(fileUrl) + 1; char *decodedPath = (char *)malloc(decodedSize); -- cgit v1.2.3