fixed SPF_InsertIncludesPass unpacking
This commit is contained in:
@@ -2207,15 +2207,16 @@ int SPF_InsertIncludesPass(void*& context, int winHandler, short *options, short
|
||||
return -3;
|
||||
|
||||
filesToInclude.clear();
|
||||
for (int i = 0; i < splited.size(); ++i)
|
||||
unsigned i = 0;
|
||||
while (i < splited.size())
|
||||
{
|
||||
string file = splited[i];
|
||||
string file = splited[i++];
|
||||
int num = 0;
|
||||
if (sscanf(splited[i + 1].c_str(), "%d", &num) == -1)
|
||||
if (sscanf(splited[i++].c_str(), "%d", &num) == -1)
|
||||
return -4;
|
||||
|
||||
__spf_print(1, "file = %s:\n", file.c_str());
|
||||
for (int k = i + 2; k < i + 2 + 2 * num; k += 2)
|
||||
for (int k = i; k < i + 2 * num; k += 2)
|
||||
{
|
||||
int line = 0;
|
||||
if (sscanf(splited[k].c_str(), "%d", &line) == -1)
|
||||
@@ -2225,7 +2226,7 @@ int SPF_InsertIncludesPass(void*& context, int winHandler, short *options, short
|
||||
filesToInclude[file].push_back(pair);
|
||||
__spf_print(1, " include = [%d %s]\n", pair.first, pair.second.c_str());
|
||||
}
|
||||
i += 1 + num;
|
||||
i += 2 * num;
|
||||
}
|
||||
return simpleTransformPass(INSERT_INCLUDES, options, projName, folderName, output, outputSize, outputMessage, outputMessageSize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user