Skip to content
Snippets Groups Projects
Commit b1423a4d authored by rswindell's avatar rswindell
Browse files

Replaces #! line with blank line to keep line counter accurate.

parent ebbc709e
No related branches found
No related tags found
No related merge requests found
...@@ -559,7 +559,7 @@ long js_exec(const char *fname, char** args) ...@@ -559,7 +559,7 @@ long js_exec(const char *fname, char** args)
line_no++; line_no++;
#ifdef __unix__ /* Support Unix Shell Scripts that start with #!/path/to/jsexec */ #ifdef __unix__ /* Support Unix Shell Scripts that start with #!/path/to/jsexec */
if(line_no==1 && strncmp(line,"#!",2)==0) if(line_no==1 && strncmp(line,"#!",2)==0)
continue; strcpy(line,"\n"); /* To keep line count correct */
#endif #endif
if((js_buf=realloc(js_buf,js_buflen+strlen(line)))==NULL) { if((js_buf=realloc(js_buf,js_buflen+strlen(line)))==NULL) {
fprintf(errfp,"!Error allocating %u bytes of memory\n" fprintf(errfp,"!Error allocating %u bytes of memory\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment