mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-04 06:54:27 -05:00 
			
		
		
		
	wrt350nv2-builder: fix a small off-by-one error (thx, mb)
SVN-Revision: 18764
This commit is contained in:
		
							parent
							
								
									62d2ed2657
								
							
						
					
					
						commit
						2820f3cbd3
					
				@ -257,7 +257,7 @@ int parse_par_file(FILE *f_par) {
 | 
				
			|||||||
		// split line if starting with a colon
 | 
							// split line if starting with a colon
 | 
				
			||||||
		switch (line[0]) {
 | 
							switch (line[0]) {
 | 
				
			||||||
			case ':':
 | 
								case ':':
 | 
				
			||||||
				count = sscanf(line, ":%64s %i %64s", string1, &value, string2);
 | 
									count = sscanf(line, ":%63s %i %63s", string1, &value, string2);
 | 
				
			||||||
				if (count != 3) {
 | 
									if (count != 3) {
 | 
				
			||||||
					printf("line %i does not meet defined format (:<mtdname> <mtdsize> <file>)\n", lineno);
 | 
										printf("line %i does not meet defined format (:<mtdname> <mtdsize> <file>)\n", lineno);
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
@ -316,7 +316,7 @@ int parse_par_file(FILE *f_par) {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case '#':	// integer values
 | 
								case '#':	// integer values
 | 
				
			||||||
				count = sscanf(line, "#%64s %i", string1, &value);
 | 
									count = sscanf(line, "#%63s %i", string1, &value);
 | 
				
			||||||
				if (count != 2) {
 | 
									if (count != 2) {
 | 
				
			||||||
					printf("line %i does not meet defined format (:<variable name> <integer>\n", lineno);
 | 
										printf("line %i does not meet defined format (:<variable name> <integer>\n", lineno);
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
@ -332,7 +332,7 @@ int parse_par_file(FILE *f_par) {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case '$':	// strings
 | 
								case '$':	// strings
 | 
				
			||||||
				count = sscanf(line, "$%64s %64s", string1, string2);
 | 
									count = sscanf(line, "$%63s %63s", string1, string2);
 | 
				
			||||||
				if (count != 2) {
 | 
									if (count != 2) {
 | 
				
			||||||
					printf("line %i does not meet defined format (:<mtdname> <mtdsize> <file>)\n", lineno);
 | 
										printf("line %i does not meet defined format (:<mtdname> <mtdsize> <file>)\n", lineno);
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user