From 6c49b09f77389618a50952010cf78ff43f4264dc Mon Sep 17 00:00:00 2001 From: geby Date: Fri, 18 Jun 2021 13:16:38 +0000 Subject: [PATCH] asn1util.pas - support for encoding of 64bit MIB element git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@229 7c85be65-684b-0410-a082-b2ed4fbef004 --- asn1util.pas | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/asn1util.pas b/asn1util.pas index 5778086..d653bfe 100644 --- a/asn1util.pas +++ b/asn1util.pas @@ -1,9 +1,9 @@ {==============================================================================| -| Project : Ararat Synapse | 002.001.000 | +| Project : Ararat Synapse | 002.001.001 | |==============================================================================| | Content: support for ASN.1 BER coding and decoding | |==============================================================================| -| Copyright (c)1999-2014, Lukas Gebauer | +| Copyright (c)1999-2021, Lukas Gebauer | | All rights reserved. | | | | Redistribution and use in source and binary forms, with or without | @@ -33,7 +33,7 @@ | DAMAGE. | |==============================================================================| | The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).| -| Portions created by Lukas Gebauer are Copyright (c) 1999-2014 | +| Portions created by Lukas Gebauer are Copyright (c) 1999-2021 | | Portions created by Hernan Sanchez are Copyright (c) 2000. | | All Rights Reserved. | |==============================================================================| @@ -378,9 +378,9 @@ end; {==============================================================================} function MibToId(Mib: String): AnsiString; var - x: Integer; + x: int64; - function WalkInt(var s: String): Integer; + function WalkInt(var s: String): int64; var x: Integer; t: AnsiString; @@ -396,7 +396,7 @@ var t := Copy(s, 1, x - 1); s := Copy(s, x + 1, Length(s) - x); end; - Result := StrToIntDef(t, 0); + Result := StrToInt64Def(t, 0); end; begin @@ -414,7 +414,8 @@ end; {==============================================================================} function IdToMib(const Id: AnsiString): String; var - x, y, n: Integer; + x, y: int64; + n: Integer; begin Result := ''; n := 1;