File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 2222   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
2323   SOFTWARE. 
2424*/ 
25- #define  K8_VERSION  " 0.2.3-r67 " //  known to work with V8-3.16.14
25+ #define  K8_VERSION  " 0.2.4-r79 " //  known to work with V8-3.16.14
2626
2727#include  < stdlib.h> 
2828#include  < stdint.h> 
@@ -140,6 +140,15 @@ v8::Handle<v8::String> k8_readfile(const char *name) // Read the entire file. Co
140140		i += read;
141141	}
142142	fclose (file);
143+ 
144+ 	if  (size > 2  && strncmp (chars, " #!" 2 ) == 0 ) { //  then skip the "#!" line
145+ 		int  i;
146+ 		for  (i = 0 ; i < size; ++i)
147+ 			if  (chars[i] == ' \n ' break ;
148+ 		size -= i + 1 ;
149+ 		memmove (chars, &chars[i+1 ], size);
150+ 	}
151+ 
143152	v8::Handle<v8::String> result = v8::String::New (chars, size);
144153	delete[]  chars;
145154	return  result;
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments