diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-17 18:47:36 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-17 18:48:29 +0100 |
commit | e0ba689dba9037fa008d834373704045b2fc2f59 (patch) | |
tree | 67b39b783b451f63ea13cb3a3c5cd54b2f85b973 | |
parent | 25973212367848e25c538301985ad2b1fd03ea02 (diff) |
Copy filename from argv
Fix #449
-rw-r--r-- | swaygrab/main.c | 2 |
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); |