aboutsummaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
Diffstat (limited to 'x.c')
-rw-r--r--x.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/x.c b/x.c
index 71a95ac..7ca1b41 100644
--- a/x.c
+++ b/x.c
@@ -729,7 +729,9 @@ xdndpastedata(char *data)
t = strtok(data, "\n\r");
while(t != NULL) {
- t += 7; /* remove 'file://' prefix */
+ /* remove 'file://' prefix if it exists */
+ if (strncmp(data, "file://", 7) == 0)
+ t += 7;
i += xdndurldecode(t, pastedata + i);
t = strtok(NULL, "\n\r");
}