[Bf-blender-cvs] [1a3fb3e8b1e] master: Fix wrong comparison of drop target URI on X11

Sergey Sharybin noreply at git.blender.org
Mon May 7 14:20:33 CEST 2018


Commit: 1a3fb3e8b1ef1e43adb4e082c09a10caad805880
Author: Sergey Sharybin
Date:   Mon May 7 14:08:33 2018 +0200
Branches: master
https://developer.blender.org/rB1a3fb3e8b1ef1e43adb4e082c09a10caad805880

Fix wrong comparison of drop target URI on X11

Need to compare, NOT to override passed file name.

===================================================================

M	intern/ghost/intern/GHOST_DropTargetX11.cpp

===================================================================

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);



More information about the Bf-blender-cvs mailing list