mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 01:21:51 +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
|
var
|
||||||
idx, incr, nstr: LongWord;
|
idx, incr, nstr: LongWord;
|
||||||
begin
|
begin
|
||||||
|
if AHash = $FFFFFFFF then
|
||||||
|
begin
|
||||||
|
Result := '';
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
idx := AHash mod HashTableSize;
|
idx := AHash mod HashTableSize;
|
||||||
incr := 1 + (AHash mod (HashTableSize - 2));
|
incr := 1 + (AHash mod (HashTableSize - 2));
|
||||||
while True do
|
while True do
|
||||||
begin
|
begin
|
||||||
nstr := HashTable^[idx];
|
nstr := HashTable^[idx];
|
||||||
if nstr = 0 then
|
if (nstr = 0) or (nstr > StringCount) then
|
||||||
begin
|
begin
|
||||||
Result := '';
|
Result := '';
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user