Ver código fonte

Fix compiler bug

Unknown bug caused by compiler when account has a name and trying to decode in EPASA
Pascal Coin 4 anos atrás
pai
commit
cdd6c428ea
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      src/core/UEPasaDecoder.pas

+ 4 - 2
src/core/UEPasaDecoder.pas

@@ -28,7 +28,7 @@ uses
   SysUtils,
   TypInfo,
   {$IFNDEF FPC}System.Generics.Collections{$ELSE}Generics.Collections{$ENDIF},
-  UBlockChain, UNode, UBaseTypes,
+  UBlockChain, UNode, UBaseTypes, UPCDataTypes,
   UAccounts,
   UEncoding,
   UEPasa,
@@ -64,6 +64,7 @@ var
   LUnencryptedPayloadBytes, LPwd : TBytes;
   LDone : Boolean;
   i : Integer;
+  LAccount : TAccount;
 begin
   LUnencryptedPayloadBytes := Nil;
   AEPasa.Clear;
@@ -88,7 +89,8 @@ begin
       AEPasa.AccountName := '@';
     end else begin
       if Assigned(ANode) then begin
-        AEPasa.AccountName := ANode.GetMempoolAccount(AAccount).name.ToPrintable;
+        LAccount := ANode.GetMempoolAccount(AAccount);
+        AEPasa.AccountName := LAccount.name.ToPrintable;
       end;
       if AEPasa.AccountName='' then begin
         ADecodeEPasaResult := der_AccountNameNotFound; // Will continue processing