Forráskód Böngészése

* Guard against empty email

Michaël Van Canneyt 1 hete
szülő
commit
b207785ef0
1 módosított fájl, 1 hozzáadás és 0 törlés
  1. 1 0
      packages/fcl-md/src/markdown.inlinetext.pas

+ 1 - 0
packages/fcl-md/src/markdown.inlinetext.pas

@@ -848,6 +848,7 @@ begin
   Result:=False;
   Result:=False;
   S:=Scanner.PeekWhile(cEmailChars);
   S:=Scanner.PeekWhile(cEmailChars);
   lLen:=Length(S);
   lLen:=Length(S);
+  if lLen=0 then exit;
   cLast:=s[lLen];
   cLast:=s[lLen];
   // Strip off _ or -
   // Strip off _ or -
   if CharInSet(cLast,['_','-']) then
   if CharInSet(cLast,['_','-']) then