aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-12-02 05:31:16 +0100
committerMattias Andrée <maandree@operamail.com>2015-12-02 05:31:16 +0100
commit5debf5d8e5debc0d1c53a5a493fade79f51fecf5 (patch)
tree96446a2bc760ea6f56cfca1f28d6a2a446518ac1 /src
parentdo not require argv[0], it is possible to only specify the file to run, and let argv be empty (diff)
downloadexec-as-5debf5d8e5debc0d1c53a5a493fade79f51fecf5.tar.gz
exec-as-5debf5d8e5debc0d1c53a5a493fade79f51fecf5.tar.bz2
exec-as-5debf5d8e5debc0d1c53a5a493fade79f51fecf5.tar.xz
derp1.1
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/exec-as.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exec-as.c b/src/exec-as.c
index 842dc82..dcb527e 100644
--- a/src/exec-as.c
+++ b/src/exec-as.c
@@ -33,9 +33,10 @@ int main(int argc, char** argv)
}
execname = argv[0];
+ file = argv[1];
- for (i = 0; i < argc - 1; i++)
- argv[i] = argv[i + 12];
+ for (i = 0; i < argc - 2; i++)
+ argv[i] = argv[i + 2];
argv[i] = NULL;
execvp(file, argv);