fundamentalslib / fundamentals5

Fundamentals 5 Code Library for FreePascal and Delphi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in calling CompareMemNoAsciiCase() in flcHTMLElements.pas

adem0x opened this issue · comments

in flcHTMLElements.pas

in function htmlGetTagIDPtrA();

this portion
CompareMemNoAsciiCase(Name^, Pointer(P^.Name)^, NameLen)
should be
CompareMemNoAsciiCase(Name^, Pointer(AnsiString(P^.Name))^, NameLen)

and similarly, in function htmlGetAttrIDPtrA()
this portion
CompareMemNoAsciiCase(Name^, Pointer(htmlAttributeTable[Result])^, NameLen)
should be
CompareMemNoAsciiCase(Name^, Pointer(AnsiString(htmlAttributeTable[Result]))^, NameLen)

Otherwise, CompareMemNoAsciiCase() fails.

Could you please add those typecasts.

@adem0x
Why not to make a pull request?

I am not comfortable with Git.
You're, however, welcome to do so --if you please.

Fixed in commit 96c19b5