mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-23 12:51:47 +02:00
* Patch for gettext empty string problem, Mantis 14902
git-svn-id: trunk@14102 -
This commit is contained in:
parent
58287faa88
commit
77fcc27837
@ -174,12 +174,17 @@ function TMOFile.Translate(AOrig: PChar; ALen: Integer; AHash: LongWord): String
|
||||
var
|
||||
idx, incr, nstr: LongWord;
|
||||
begin
|
||||
if AHash = $FFFFFFFF then
|
||||
begin
|
||||
Result := '';
|
||||
exit;
|
||||
end;
|
||||
idx := AHash mod HashTableSize;
|
||||
incr := 1 + (AHash mod (HashTableSize - 2));
|
||||
while True do
|
||||
begin
|
||||
nstr := HashTable^[idx];
|
||||
if nstr = 0 then
|
||||
if (nstr = 0) or (nstr > StringCount) then
|
||||
begin
|
||||
Result := '';
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user