Skip to content

Commit

Permalink
Backport: Simplified the fix for the problem with recognizing ascci f…
Browse files Browse the repository at this point in the history
…iles. Tested with ascii, Amigaguide, JPEG, EXE.
  • Loading branch information
mattrust authored and deadwood committed Feb 7, 2023
1 parent c458a59 commit ac363c4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions workbench/libs/datatypes/helpfuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,14 @@ struct CompoundDataType *FindDtInList(struct Library *DataTypesBase,
cur->DT.dtn_Node1.ln_Succ;
cur = (struct CompoundDataType *)cur->DT.dtn_Node1.ln_Succ)
{
/* we must handle the root datatypes because they have cur->DTH.dth_MaskLen set to 0 */
if (!strcmp(cur->DTH.dth_Name, "ascii") || !strcmp(cur->DTH.dth_Name, "binary"))
{
D(bug("[FindDtInList] base class %s found\n", cur->DTH.dth_Name));
found = TRUE;
}

if (!found && !(cur->DTH.dth_MaskLen) && (cur->Function))
{
D(bug("[FindDtInList] *** Calling %s Match Function @ 0x%p\n", cur->DT.dtn_Node1.ln_Name, cur->Function));
found = (cur->Function)(dthc);
}

if (!found && cur->DTH.dth_MaskLen && CheckSize >= cur->DTH.dth_MaskLen)
if (!found && CheckSize >= cur->DTH.dth_MaskLen)
{
WORD *msk = cur->DTH.dth_Mask;
UBYTE *cmp = CheckArray;
Expand Down

0 comments on commit ac363c4

Please sign in to comment.