sourcemm/sourcemm.cpp
changeset 21 2c90a194f7c4
parent 18 8848d3ef28d8
child 39 f7f7c5a4e889
     1.1 --- a/sourcemm/sourcemm.cpp	Mon Apr 18 19:33:44 2005 +0000
     1.2 +++ b/sourcemm/sourcemm.cpp	Mon Apr 18 19:50:33 2005 +0000
     1.3 @@ -296,10 +296,16 @@
     1.4  
     1.5  	char buffer[255], error[255], full_path[128];
     1.6  	const char *ptr, *ext;
     1.7 +	size_t length;
     1.8  	while (!feof(fp))
     1.9  	{
    1.10  		buffer[0] = '\0';
    1.11  		fgets(buffer, sizeof(buffer)-1, fp);
    1.12 +		length = strlen(buffer);
    1.13 +		if (!length)
    1.14 +			continue;
    1.15 +		if (buffer[length-1] == '\n')
    1.16 +			buffer[length-1] = '\0';
    1.17  		if (buffer[0] == ';' || strncmp(buffer, "//", 2) == 0)
    1.18  			continue;
    1.19  		//First find if it's an absolute path or not...