mirror of
https://github.com/sharkcz/rkdeveloptool.git
synced 2024-10-20 06:49:33 +02:00
Fix pack parsing
The index needѕ to be incremented after a valid path was found. Otherwise gOpts.loader[index].name will be out of of bound after the second iteration. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
This commit is contained in:
parent
5b7445d109
commit
544ec1d465
2
main.cpp
2
main.cpp
@ -1073,9 +1073,9 @@ static bool parseLoader(FILE* file) {
|
||||
if (fscanf(file, OPT_LOADER_NAME "%d=%s", &index, buf)
|
||||
!= 2)
|
||||
return false;
|
||||
index--;
|
||||
strcpy(gOpts.loader[index].name, buf);
|
||||
printf("name%d: %s\n", index, gOpts.loader[index].name);
|
||||
index++;
|
||||
}
|
||||
for (i=0; i<gOpts.loaderNum; i++) {
|
||||
if (SCANF_EAT(file) != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user