This commit is contained in:
Eduardo de la Arada 2013-10-14 16:15:55 +02:00
parent 3a52fdd57d
commit 7af16bdd34
1 changed files with 3 additions and 1 deletions

View File

@ -276,8 +276,10 @@ int main(int argc, char **argv) {
if (ofileauto) {
int fd;
if (file) {
char *o, *p = strdup (file);
char *o, *q, *p = strdup (file);
if ( (o = strchr (p, '.')) ) {
while ( (q = strchr (o+1, '.')) )
o = q;
*o = 0;
fd = openfile (p, ISEXEC);
} else fd = openfile ("a.out", ISEXEC);