From 66c24def5fc23cc5c9f2d8f85ae7bf9e58a92d6c Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 18 Oct 2020 00:18:36 +0300 Subject: Keylen fix. --- main.sts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.sts') diff --git a/main.sts b/main.sts index ad7c100..8543626 100644 --- a/main.sts +++ b/main.sts @@ -55,6 +55,7 @@ checktext.count 0 = if checktext.count float_iload float_div float_fstore swap ! 1 + od drop + 1a print_stack newline sys_write ; Decide if text is real: freq_eng calcdist if 1 else 0 fi @@ -87,8 +88,8 @@ set_entry float_init ; this is program with floats dup 0 = untilod drop drop local plaintext - ; check deciphering attempt, exit if Ok or keylen = max (16) - keylen 10 = if eeeee else length checktext fi dup until drop + ; check deciphering attempt, exit if Ok or keylen = max (2) + keylen 2 = if eeeee else length checktext fi dup until drop ; else remove the text from stack and place keylen back 0 do dup length = until swap drop 1 + -- cgit v1.2.3