mirror of https://gitlab.com/nakst/essence
				
				
				
			common: fix rich text markup skipping in EsStringCompare with empty strings
This commit is contained in:
		
							parent
							
								
									7aad347fe5
								
							
						
					
					
						commit
						8f411e35b7
					
				| 
						 | 
				
			
			@ -947,13 +947,13 @@ int EsStringCompare(const char *s1, ptrdiff_t _length1, const char *s2, ptrdiff_
 | 
			
		|||
	size_t length1 = _length1, length2 = _length2;
 | 
			
		||||
 | 
			
		||||
	while (length1 || length2) {
 | 
			
		||||
		if (!length1) return -1;
 | 
			
		||||
		if (!length2) return 1;
 | 
			
		||||
 | 
			
		||||
		// Skip over rich text markup.
 | 
			
		||||
		if (*s1 == '\a') while (length1 && *s1 != ']') s1++, length1--;
 | 
			
		||||
		if (*s2 == '\a') while (length2 && *s2 != ']') s2++, length2--;
 | 
			
		||||
 | 
			
		||||
		if (!length1) return -1;
 | 
			
		||||
		if (!length2) return 1;
 | 
			
		||||
 | 
			
		||||
		char c1 = *s1;
 | 
			
		||||
		char c2 = *s2;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue