Browse Source

* AnsiExtractquotedStr returns original string if unquoted

git-svn-id: trunk@34495 -
michael 9 years ago
parent
commit
f4e3068c8b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      rtl/objpas/sysutils/sysstr.inc

+ 2 - 1
rtl/objpas/sysutils/sysstr.inc

@@ -630,7 +630,7 @@ begin
  Q := StrEnd(P);
  Q := StrEnd(P);
  result:='';
  result:='';
  if P=Q then exit;
  if P=Q then exit;
- if P^<>quote then exit;
+ if P^<>quote then exit(strpas(P));
  inc(p);
  inc(p);
 
 
  setlength(result,(Q-P)+1);
  setlength(result,(Q-P)+1);
@@ -1836,6 +1836,7 @@ var p : pchar;
 begin
 begin
   p:=pchar(pointer(s)); // work around CONST. Ansiextract is safe for nil
   p:=pchar(pointer(s)); // work around CONST. Ansiextract is safe for nil
   result:=AnsiExtractquotedStr(p,AQuote);
   result:=AnsiExtractquotedStr(p,AQuote);
+  
 end;
 end;
 
 
 function StrToBool(const S: string): Boolean;
 function StrToBool(const S: string): Boolean;