From c54f94c431bbdc54d2a182bb1a05202818fe38fd Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 18 Oct 2020 00:37:08 +0300 Subject: Fix. --- main.sts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.sts b/main.sts index 8543626..20429a4 100644 --- a/main.sts +++ b/main.sts @@ -38,11 +38,12 @@ defword checktext checktext.length do 1 - dup word_size mul checktext.text + @ dup dup 'z' > 0 = swap 'a' < 0 = mul if - dup 'z' swap - word_size mul checktext.fr + dup @ + 1 swap ! + dup 'z' swap - word_size mul checktext.fr + dup @ 1 + swap ! + checktext.count 1 + as checktext.count fi dup dup 'Z' > 0 = swap 'A' < 0 = mul if - dup 'Z' swap - word_size mul checktext.fr + dup @ + 1 swap ! + dup 'Z' swap - word_size mul checktext.fr + dup @ 1 + swap ! + checktext.count 1 + as checktext.count fi drop - checktext.count 1 + as checktext.count dup 0 = untilod drop ; ZERO DIVISION SHALL NOT PASS checktext.count 0 = if -- cgit v1.2.3