repo: music
action: commit
revision: 
path_from: 
revision_from: 8ca6904c07d551570b661422fb7b31188db609be:
path_to: 
revision_to: 
git.thebackupbox.net
music
git clone git://git.thebackupbox.net/music
commit 8ca6904c07d551570b661422fb7b31188db609be
Author: epoch 
Date:   Tue Nov 19 01:09:49 2019 -0600

    changed some returns and added on for trying to go to line -1

diff --git a/qargs.c b/qargs.c
index b27a3c24167999a593b3d2ca30f434df193a3818..
index ..081592465e155601c4d414ed409014ff4497f71b 100644
--- a/qargs.c
+++ b/qargs.c
@@ -57,7 +57,7 @@ int main(int argc,char *argv[]) {
     switch(pid=fork()) {
       case -1://fuck me
         perror("fork");
-        return 1;
+        return -1;
       case 0://we're the child
         fprintf(stderr,"running line %d in pid %d: %s %s\n",index,getpid(),argv[1],line[index]);
         if(getenv("QARGS_CHILD_PIDFILE")) {
@@ -84,7 +84,10 @@ int main(int argc,char *argv[]) {
     }
     fprintf(stderr,"child %d exited. going to %d the index.\n",pid,direction);
     index+=direction;
-    if(index < 0) index=0;
+    if(index < 0) {
+      fprintf(stderr,"tried to previous to before 0. exiting with code of 1.\n");
+      return 1;
+    }
     direction=DIR_NEXT;
   }
 }

-----END OF PAGE-----