aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorAdrian Kummerländer2017-04-21 13:31:54 +0000
committerAdrian Kummerländer2017-04-21 13:31:54 +0000
commita94041796c0baffdf575a1ed340e1c1fa685c5e9 (patch)
tree6ac8897704e9a9e267e16c4a73594b21e58902a8 /example
parent22c78d20992967e24ec8c8cf5adaf7466d3d0fd7 (diff)
downloadslang-a94041796c0baffdf575a1ed340e1c1fa685c5e9.tar
slang-a94041796c0baffdf575a1ed340e1c1fa685c5e9.tar.gz
slang-a94041796c0baffdf575a1ed340e1c1fa685c5e9.tar.bz2
slang-a94041796c0baffdf575a1ed340e1c1fa685c5e9.tar.lz
slang-a94041796c0baffdf575a1ed340e1c1fa685c5e9.tar.xz
slang-a94041796c0baffdf575a1ed340e1c1fa685c5e9.tar.zst
slang-a94041796c0baffdf575a1ed340e1c1fa685c5e9.zip
Fix stack polution bug in fizzbuzz example
Diffstat (limited to 'example')
-rw-r--r--example/fizzbuzz.slang2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/fizzbuzz.slang b/example/fizzbuzz.slang
index 653c180..5693c9a 100644
--- a/example/fizzbuzz.slang
+++ b/example/fizzbuzz.slang
@@ -7,7 +7,7 @@
§ buzz? @ 5 % 0 = ;
§ fizzbuzz_or_fizz buzz? if fizzbuzz then fizz else . pop ;
-§ buzz_or_print dup buzz? if buzz then @ else . pop ;
+§ buzz_or_print dup buzz? if pop buzz then @ else . pop ;
§ branch dup fizz? if fizzbuzz_or_fizz then buzz_or_print else ;