shithub: tinygl

Download patch

ref: cd9285f1362787e175bb2b1761a323cdf1088456
parent: 2e0ab280ff4f09cf34cecb59603c76b08084a628
author: gek169 <gek169>
date: Fri May 14 09:43:44 EDT 2021

Automatic commit.

--- a/include-demo/stringutil.h
+++ b/include-demo/stringutil.h
@@ -422,7 +422,8 @@
 	strll* right_right;  
 	strll* top = current_node;
 	if(current_node->right == NULL) return; /*Nothing to do!*/
-	right_right = current_node->right->right;
+	right_right = top->right->right;
+	top->right->right = NULL;
 	if(current_node->child){
 		current_node = current_node->child;
 		for(;current_node->right != NULL;current_node = current_node->right){};
@@ -430,7 +431,7 @@
 		current_node->right = top->right;
 		top->right = right_right;
 	} else {
-		current_node->child = top->right;
+		top->child = top->right;
 		top->right = right_right;
 	}
 	
@@ -442,6 +443,7 @@
 	strll* top = current_node;
 	if(current_node->right == NULL) return; /*Nothing to do!*/
 	right_right = current_node->right->right;
+	top->right->right = NULL;
 	if(current_node->child){
 		current_node = current_node->left;
 		for(;current_node->right != NULL;current_node = current_node->right){};