From 03ca378b02e8bd4ac044e6d43aaa0a46e214e282 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 12 Aug 2017 18:38:56 +0200 Subject: [PATCH] initialize caa flags to 0 when not given --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 017d218..c4dee38 100644 --- a/index.js +++ b/index.js @@ -337,6 +337,8 @@ rcaa.encode = function (data, buf, offset) { if (data.issuerCritical) { data.flags = rcaa.ISSUER_CRITICAL + } else { + data.flags = 0 } buf.writeUInt16BE(len - 2, offset)