Skip to content

Commit

Permalink
Fixbug: [skqctl tool] Cannot generate config files from excel.
Browse files Browse the repository at this point in the history
  • Loading branch information
i0gan committed Feb 8, 2024
1 parent 9bf84fe commit 1f4c74b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/tools/sqkctl/excel/ini_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ class IniGenerator : public IGenerator {
} else {
std::cout << "save for ini error!!!!!---> " << fileName << std::endl;
}

if (!iniWriter) fclose(iniWriter);

}

return false;
Expand Down
1 change: 1 addition & 0 deletions src/tools/sqkctl/excel/sql_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class SQLGenerator : public IGenerator {
}

fwrite(strElementData.c_str(), strElementData.length(), 1, iniWriter);
fclose(iniWriter);

return true;
}
Expand Down
4 changes: 3 additions & 1 deletion src/tools/sqkctl/excel/struct_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ class StructGenerator : public IGenerator {
} else {
std::cout << "save for struct error!!!!!---> " << fileName << std::endl;
}
}

if(!structWriter) fclose(structWriter);
}

return false;
}
};
Expand Down

0 comments on commit 1f4c74b

Please sign in to comment.