From 8e0d2faefb45ec6da483bb177b635f45640d9938 Mon Sep 17 00:00:00 2001 From: datalore Date: Wed, 25 Oct 2023 12:32:35 +0200 Subject: [PATCH] Fix index for vigenere --- vigenere.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vigenere.cc b/vigenere.cc index c726269..6880a8d 100644 --- a/vigenere.cc +++ b/vigenere.cc @@ -20,7 +20,7 @@ int main(int argc, char** argv) int ki = 0; for(int pi = 0; text[pi] != 0; ++pi) { - if(text[i] == ' ') + if(text[pi] == ' ') { std::cout << ' '; continue;