aboutsummaryrefslogtreecommitdiff
path: root/swaygrab
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-17 18:47:36 +0100
committerMikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-01-17 18:48:29 +0100
commite0ba689dba9037fa008d834373704045b2fc2f59 (patch)
tree67b39b783b451f63ea13cb3a3c5cd54b2f85b973 /swaygrab
parent25973212367848e25c538301985ad2b1fd03ea02 (diff)
Copy filename from argv
Fix #449
Diffstat (limited to 'swaygrab')
-rw-r--r--swaygrab/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/swaygrab/main.c b/swaygrab/main.c
index 403f7b38..82d623e7 100644
--- a/swaygrab/main.c
+++ b/swaygrab/main.c
@@ -229,7 +229,7 @@ int main(int argc, char **argv) {
sway_abort("Invalid usage. See `man swaygrab` %d %d", argc, optind);
}
} else if (optind < argc) {
- file = argv[optind];
+ file = strdup(argv[optind]);
}
int socketfd = ipc_open_socket(socket_path);