shithub: orca

Download patch

ref: 9ab87c2dcc0c3cdea05193197c473512d7d138e1
parent: 3bca64d349c14b9dc1f3a020b1360827091597a5
author: Nicola Pisanti <nicola@npisanti.com>
date: Mon Apr 13 08:35:45 EDT 2020

fixes I to work with capitals

--- a/sim.c
+++ b/sim.c
@@ -482,17 +482,18 @@
   PORT(0, -1, IN | PARAM);
   PORT(0, 1, IN);
   PORT(1, 0, IN | OUT);
-  Glyph g = PEEK(0, -1);
+  Glyph ga = PEEK(0, -1);
+  Glyph gb = PEEK(0, 1);
   Usz rate = 1;
-  if (g != '.' && g != '*')
-    rate = index_of(g);
-  Usz max = index_of(PEEK(0, 1));
+  if (ga != '.' && ga != '*')
+    rate = index_of(ga);
+  Usz max = index_of(gb);
   Usz val = index_of(PEEK(1, 0));
   if (max == 0)
     max = 36;
   val = val + rate;
   val = val % max;
-  POKE(1, 0, glyph_of(val));
+  POKE(1, 0, glyph_with_case(glyph_of(val), gb));
 END_OPERATOR
 
 BEGIN_OPERATOR(jump)