Retreated uC patch for: GSM->DispatchMessage(MessageLength +/- 2 ,...
[gnokii.git] / gnokii / gnokii.c
index 9b94644..caec03c 100644 (file)
@@ -20,6 +20,8 @@
 #include <ctype.h>
 #include <time.h>
 #include <sys/stat.h>
+#include <limits.h>
+#include <errno.h>
 
 #ifdef UCLINUX
 /* <getopt.h> or "getopt.h" would include insufficient getopt.h from uClinux */
@@ -1280,7 +1282,7 @@ int main(int argc, char *argv[])
 
     for(i = 2; i < argc; i++)
       nargv[i-2] = argv[i];
-               nargv[argc] = NULL;     /* required by gnokiid() for execv(3) */
+               nargv[argc-2] = NULL;   /* required by gnokiid() for execv(3) */
        
     if(checkargs(c, gals, nargc)) {