mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 15:43:01 +00:00 
			
		
		
		
	Address #291
When resuming a fiber with a child, the root fiber was set incorrectly.
This commit is contained in:
		| @@ -1262,10 +1262,12 @@ JanetSignal janet_continue(JanetFiber *fiber, Janet in, Janet *out) { | |||||||
|  |  | ||||||
|     /* Continue child fiber if it exists */ |     /* Continue child fiber if it exists */ | ||||||
|     if (fiber->child) { |     if (fiber->child) { | ||||||
|  |         if (janet_vm_root_fiber == NULL) janet_vm_root_fiber = fiber; | ||||||
|         JanetFiber *child = fiber->child; |         JanetFiber *child = fiber->child; | ||||||
|         janet_vm_stackn++; |         janet_vm_stackn++; | ||||||
|         JanetSignal sig = janet_continue(child, in, &in); |         JanetSignal sig = janet_continue(child, in, &in); | ||||||
|         janet_vm_stackn--; |         janet_vm_stackn--; | ||||||
|  |         if (janet_vm_root_fiber == fiber) janet_vm_root_fiber = NULL; | ||||||
|         if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) { |         if (sig != JANET_SIGNAL_OK && !(child->flags & (1 << sig))) { | ||||||
|             *out = in; |             *out = in; | ||||||
|             return sig; |             return sig; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose