Skip to content

Commit

Permalink
Fix nasa#62, correct name match in table build
Browse files Browse the repository at this point in the history
Confirm that the next char in the name match is a separator before breaking
out of the loop.  This avoids matching on a prefix, such as SC to SCH_LAB.
  • Loading branch information
jphickey committed Nov 7, 2023
1 parent fd91c41 commit ebc0e3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cfecfs/eds2cfetbl/eds2cfetbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,11 @@ void LoadTemplateFile(lua_State *lua, const char *Filename)
EdsAppNameLen = strlen(EdsAppName);
if (strncasecmp(EdsAppName, CFE_TBL_FileDefPtr->TableName, EdsAppNameLen) == 0)
{
printf("Matched EDS Package Name: %s\n", EdsAppName);
break;
if (!isalpha((unsigned char)CFE_TBL_FileDefPtr->TableName[EdsAppNameLen]))
{
printf("Matched EDS Package Name: %s\n", EdsAppName);
break;
}
}
}

Expand Down

0 comments on commit ebc0e3c

Please sign in to comment.