浏览代码

+ Fixed scanning of strings with quotes in them

michael 21 年之前
父节点
当前提交
7ebd56b69d
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      fcl/passrc/pscanner.pp

+ 7 - 5
fcl/passrc/pscanner.pp

@@ -590,12 +590,11 @@ begin
 	    begin
 	    begin
 	      SectionLength := TokenStr - TokenStart + 1;
 	      SectionLength := TokenStr - TokenStart + 1;
 	      SetLength(FCurTokenString, OldLength + SectionLength);
 	      SetLength(FCurTokenString, OldLength + SectionLength);
-	      if SectionLength > 1 then
-	        Move(TokenStart^, FCurTokenString[OldLength + 1],
-		  SectionLength);
+	      if SectionLength > 0 then
+	        Move(TokenStart^, FCurTokenString[OldLength + 1], SectionLength);
 	      Inc(OldLength, SectionLength);
 	      Inc(OldLength, SectionLength);
 	      Inc(TokenStr);
 	      Inc(TokenStr);
-	      TokenStart := TokenStr;
+	      TokenStart := TokenStr+1;
 	    end else
 	    end else
 	      break;
 	      break;
 
 
@@ -1027,7 +1026,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2004-05-01 20:08:51  marco
+  Revision 1.7  2004-07-23 23:41:10  michael
+  + Fixed scanning of strings with quotes in them
+
+  Revision 1.6  2004/05/01 20:08:51  marco
    * Exception on file not found
    * Exception on file not found
 
 
   Revision 1.5  2003/10/25 16:24:29  michael
   Revision 1.5  2003/10/25 16:24:29  michael