From b5e7566e552ecedbf25e0009bece3ff2fc98b012 Mon Sep 17 00:00:00 2001 From: Mattias Gaertner Date: Thu, 1 Nov 2018 12:40:25 +0000 Subject: [PATCH] fcl-js: fixed hashlist for pas2js git-svn-id: trunk@40135 - --- packages/fcl-js/src/jssrcmap.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/fcl-js/src/jssrcmap.pas b/packages/fcl-js/src/jssrcmap.pas index 03ad6542c7..5f43951383 100644 --- a/packages/fcl-js/src/jssrcmap.pas +++ b/packages/fcl-js/src/jssrcmap.pas @@ -474,7 +474,7 @@ end; procedure TSourceMap.TStringToIndex.Add(const Value: String; Index: integer); begin {$ifdef pas2js} - FItems[Value]:=Index; + FItems['%'+Value]:=Index; {$else} // Note: nil=0 means not found in TFPHashList FItems.Add(Value,{%H-}Pointer(PtrInt(Index+1))); @@ -485,8 +485,8 @@ function TSourceMap.TStringToIndex.FindValue(const Value: String ): integer; begin {$ifdef pas2js} - if FItems.hasOwnProperty(Value) then - Result:=integer(FItems[Value]) + if FItems.hasOwnProperty('%'+Value) then + Result:=integer(FItems['%'+Value]) else Result:=-1; {$else}