shithub: femtolisp

Download patch

ref: 494e560b72f5132a3b88db7e28b3e8d872fa55cc
parent: f114c6d79258d5663605c8f0562a7f88b25f9e2d
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Mar 27 12:54:25 EDT 2023

maxstack: don't run over the code

--- a/maxstack.inc
+++ b/maxstack.inc
@@ -5,7 +5,8 @@
     uint32_t i, n, sp = 0, maxsp = 0;
 
     while (ip < end) {
-        if ((int32_t)sp > (int32_t)maxsp) maxsp = sp;
+        if ((int32_t)sp > (int32_t)maxsp)
+            maxsp = sp;
         op = *ip++;
         switch (op) {
         case OP_LOADA: case OP_LOADI8: case OP_LOADV: case OP_LOADG: