]> Cypherpunks repositories - keks.git/commitdiff
Fix awful typo error
authorSergey Matveev <stargrave@stargrave.org>
Thu, 21 Nov 2024 20:29:13 +0000 (23:29 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 21 Nov 2024 20:29:13 +0000 (23:29 +0300)
cyac/lib/dec.c
gyac/dec.go
pyac/pyac.py

index 2bdc73947d74d0260183d6dd5411fdedb5aba97af21212ddc97b2952dec9ca8c..e7effca9f6ee024a7166677902158a1033c32ec7748bc2065b71abce9d2d0bec 100644 (file)
@@ -243,7 +243,7 @@ YACAtomDecode( // NOLINT(misc-no-recursion)
         }
         if (l > 8) {
             v = yacFromBE(buf + 1 + 8, 4);
-            if ((l == 8) && (v == 0)) {
+            if ((l == 12) && (v == 0)) {
                 return YACErrTAI64NonMinimal;
             }
             if (v > 999999999) {
index 7c4d82502bee2b4ee18c008024a0f01da113884c1295327f1b9c30b6a3ab834a..3c94d730f3a7b996bb0c29121a43e753b7a5947abdd2650f609eae4e11dfbad8 100644 (file)
@@ -283,7 +283,7 @@ func AtomDecode(buf []byte) (item *Item, off int, err error) {
                }
                if l > 8 {
                        nsecs := FromBE(buf[1+8 : 1+8+4])
-                       if l == 8 && nsecs == 0 {
+                       if l == 12 && nsecs == 0 {
                                err = errors.New("non-minimal TAI64N")
                                return
                        }
index bac693ccf2f1cff4a12ee73d0533e7428986ccf2bdbc85e858c3c67939e6c3ff..5d9a0b2f180f03861554748cc772c106330ba5729f5cf9303ab7bbbdfdeab2ef 100755 (executable)
@@ -298,7 +298,7 @@ def loads(v, sets=False, leapsecUTCAllow=False):
         nsecs = 0
         if l > 8:
             nsecs = int.from_bytes(v[1+8:1+8+4], "big")
-            if (l == 8) and (nsecs == 0):
+            if (l == 12) and (nsecs == 0):
                 raise DecodeError("non-minimal TAI64N")
             if nsecs > 999999999:
                 raise DecodeError("too many nanoseconds")