OSDN Git Service

レスアンカーのカンマの判定が間違っていたのを修正
authorh677 <h677>
Sun, 11 Dec 2005 03:06:48 +0000 (03:06 +0000)
committerh677 <h677>
Sun, 11 Dec 2005 03:06:48 +0000 (03:06 +0000)
HTMLCreate.pas

index a25ee12..da61906 100644 (file)
@@ -506,17 +506,18 @@ function THTMLCreate.checkComma(
 var
        bType : TMbcsByteType;
 begin
-       bType := ByteType(s, j);
-       if ((bType = mbSingleByte) and (s[j] = ',') or
-               ((bType = mbLeadByte) and (ZenToHan(Copy(s, j ,2)) = ','))) then begin
-               Result := true;
-               if (bType = mbSingleByte) then
-                       Inc(j)
-               else
-                       Inc(j, 2);
-               No := '';
-       end else begin
-               Result := false;
+       Result := false;
+       if (Length(s) > 0) then begin
+               bType := ByteType(s, j);
+               if ((bType = mbSingleByte) and (s[j] = ',') or
+                       ((bType = mbLeadByte) and (ZenToHan(Copy(s, j ,2)) = ','))) then begin
+                       Result := true;
+                       if (bType = mbSingleByte) then
+                               Inc(j)
+                       else
+                               Inc(j, 2);
+                       No := '';
+               end;
        end;
 end;
 function THTMLCreate.addResAnchor(