Merge pull request #146 from AntonioND/an/same-name

Prohibit sections from having the same name
This commit is contained in:
AntonioND
2017-04-02 00:36:28 +01:00
committed by GitHub
3 changed files with 29 additions and 3 deletions

View File

@@ -216,6 +216,23 @@ FindLargestSection(enum eSectionType type, bool bankFixed)
return r;
}
int
IsSectionNameInUse(const char *name)
{
struct sSection *pSection;
pSection = pSections;
while (pSection) {
if (strcmp(pSection->pzName, name) == 0)
return 1;
pSection = pSection->pNext;
}
return 0;
}
int
IsSectionSameTypeBankAndFloating(const char *name, enum eSectionType type, int bank)
{