mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:22:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff --git a/src/options.c b/src/options.c
 | |
| index 1bfe473..2bf173e 100644
 | |
| --- a/src/options.c
 | |
| +++ b/src/options.c
 | |
| @@ -56,8 +56,8 @@ int ini_load(const char *filename,
 | |
|  	}
 | |
|  
 | |
|  	while (!feof(f)) {
 | |
| -		if (fscanf(f, "[%127[^];\n]]\n", section) == 1) {
 | |
| -		} else if ((cnt = fscanf(f, " %63[^=;\n] = %255[^;\n]", name, value))) {
 | |
| +		if (fscanf(f, "[%[^];\n]]\n", section) == 1) {
 | |
| +		} else if ((cnt = fscanf(f, " %[^=;\n] = %[^;\n]", name, value))) {
 | |
|  			if (cnt == 1)
 | |
|  				*value = 0;
 | |
|  			for (s = name + strlen(name) - 1; s > name && isspace(*s); s--)
 | |
| @@ -66,7 +66,7 @@ int ini_load(const char *filename,
 | |
|  				*s = 0;
 | |
|  			report(section, name, value);
 | |
|  		}
 | |
| -		if (fscanf(f, " ;%*[^\n]") != 0 ||
 | |
| +		if (fscanf(f, " ;%[^\n]") != 0 ||
 | |
|  		    fscanf(f, " \n") != 0) {
 | |
|  			fprintf(stderr, "short read from %s!?\n", filename);
 | |
|  			fclose(f);
 | |
| diff --git a/src/seg009.c b/src/seg009.c
 | |
| index 139c2d8..e2047fb 100644
 | |
| --- a/src/seg009.c
 | |
| +++ b/src/seg009.c
 | |
| @@ -2077,7 +2077,7 @@ void load_sound_names() {
 | |
|  	while (!feof(fp)) {
 | |
|  		int index;
 | |
|  		char name[POP_MAX_PATH];
 | |
| -		if (fscanf(fp, "%d=%255s\n", &index, /*sizeof(name)-1,*/ name) != 2) {
 | |
| +		if (fscanf(fp, "%d=%s\n", &index, /*sizeof(name)-1,*/ name) != 2) {
 | |
|  			perror(names_path);
 | |
|  			continue;
 | |
|  		}
 | 
