* Patch for gettext empty string problem, Mantis 14902

git-svn-id: trunk@14102 -
This commit is contained in:
marco 2009-11-07 16:24:06 +00:00
parent 58287faa88
commit 77fcc27837

View File

@ -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;