Fixed SIGSEGV from having no arguments

This commit is contained in:
Logen Kain 2016-07-19 15:56:25 -07:00
parent 2957b2d5ee
commit 8aaaff4e27

View File

@ -9,7 +9,8 @@ char command[1024];
//xdg-open was pissed about escaped quotes so I had to go with %22 //xdg-open was pissed about escaped quotes so I had to go with %22
//added %5c in order to open first search result //added %5c in order to open first search result
strcpy(command,"xdg-open https://duckduckgo.com/?q=\%5Csite\%3Ahttp\%3A\%2F\%2Fopeneuphoria.org\%2Fdocs\%2F+\%22"); strcpy(command,"xdg-open https://duckduckgo.com/?q=\%5Csite\%3Ahttp\%3A\%2F\%2Fopeneuphoria.org\%2Fdocs\%2F+\%22");
if (argc >=1){
if (argc >1){
strcat(command, argv[1]); strcat(command, argv[1]);
} }