Fix a warnings.
[mono.git] / mono / mini / tasklets.c
index a49be599e512a0f04c789c940411dd692e8e2843..2c0bf5e37aaed46933c860ef479d387159fc5962 100644 (file)
@@ -104,8 +104,10 @@ continuation_store (MonoContinuation *cont, int state, MonoException **e)
 
        if (cont->saved_stack && num_bytes <= cont->stack_alloc_size) {
                /* clear to avoid GC retention */
-               if (num_bytes < cont->stack_used_size)
+               if (num_bytes < cont->stack_used_size) {
                        memset ((char*)cont->saved_stack + num_bytes, 0, cont->stack_used_size - num_bytes);
+                       cont->stack_used_size = num_bytes;
+               }
        } else {
                tasklets_lock ();
                internal_init ();