From 431e8494fc1f03f4789d2a88e6159b6f8d6950b6 Mon Sep 17 00:00:00 2001 From: Kaustubh BM Date: Fri, 14 May 2021 15:36:55 +0530 Subject: [PATCH] Update MultiTapCipherEncode.mjs Fixed a bug on line 58 --- src/core/operations/MultiTapCipherEncode.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/operations/MultiTapCipherEncode.mjs b/src/core/operations/MultiTapCipherEncode.mjs index 0db95ef5..12c280ec 100644 --- a/src/core/operations/MultiTapCipherEncode.mjs +++ b/src/core/operations/MultiTapCipherEncode.mjs @@ -52,10 +52,10 @@ class MultiTapCipherEncode extends Operation { if(emap[plaintext.charAt(i)] == undefined) throw new OperationError("The input must be only alphabets"); ciphertext += emap[plaintext.charAt(i)]; - if(i!=plaintext.length) + if(i!=plaintext.length-1) ciphertext += delim; } - return ciphertext.substring(0,ciphertext.length-1); + return ciphertext.substring(0,ciphertext.length); } }