IDE: fixed range check in updating po file from Vincent

git-svn-id: trunk@16183 -
This commit is contained in:
mattias 2008-08-22 13:23:36 +00:00
parent 106a0ad6cf
commit 4c807adbc8

View File

@ -261,11 +261,13 @@ begin
BasePOFile.UpdateStrings(InputLines, stRst);
except
E := EPOFileError.Create('');
on Ex: Exception do begin
E := EPOFileError.Create(Ex.Message);
E.ResFileName:=FileName;
E.POFileName:=POFileName;
raise E;
end;
end;
end;
BasePOFile.SaveToFile(POFilename);
@ -282,11 +284,13 @@ begin
try
POFile.SaveToFile(InputLines[i]);
except
E := EPOFileError.Create('');
on Ex: Exception do begin
E := EPOFileError.Create(Ex.Message);
E.ResFileName:=InputLines[i];
E.POFileName:=POFileName;
raise E;
end;
end;
finally
POFile.Free;
end;
@ -732,7 +736,7 @@ begin
while (p<=n)and(Line[p] in ['0'..'9']) do
inc(p);
UStr := UStr + Chr(StrToInt(copy(Line, j, p-j)));
until (Line[p]<>'#') or (p>=n);
until (p>n) or (Line[p]<>'#');
// transfer valid UTF-8 segments to result string
// and re-encode back the rest
while Ustr<>'' do begin