Welcome to the CHICKEN Scheme pasting service

fixed temp stack handling added by evhan on Sat Jan 16 05:10:13 2016

diff --git a/runtime.c b/runtime.c
index 8984ffb..409a495 100644
--- a/runtime.c
+++ b/runtime.c
@@ -3124,7 +3124,7 @@ C_regparm C_word C_fcall C_mutate_scratch_slot(C_word *slot, C_word val)
 
 void C_save_and_reclaim(void *trampoline, int n, C_word *av)
 {
-  C_word new_size = nmax(1UL << C_ilen(n), DEFAULT_TEMPORARY_STACK_SIZE);
+  C_word new_size = nmax(1UL << C_ilen(n), fixed_temporary_stack_size ? fixed_temporary_stack_size : DEFAULT_TEMPORARY_STACK_SIZE);
 
   assert(av > C_temporary_stack_bottom || av < C_temporary_stack_limit);
   assert(C_temporary_stack == C_temporary_stack_bottom);
@@ -3133,7 +3133,7 @@ void C_save_and_reclaim(void *trampoline, int n, C_word *av)
   if (new_size < temporary_stack_size)
     new_size = temporary_stack_size >> 1;
 
-  if (new_size != temporary_stack_size) {
+  if (new_size > temporary_stack_size) {
 
     if(fixed_temporary_stack_size)
       panic(C_text("fixed temporary stack overflow (\"apply\" called with too many arguments?)"));

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the result of `(let ((spammers 'dumb)) spammers)'?
Visually impaired? Let me spell it for you (wav file) download WAV