mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	TextUnformatted: Accept null ranges including (NULL,NULL) without asserting. (#3615)
This commit is contained in:
		| @@ -152,9 +152,13 @@ void ImGui::TextEx(const char* text, const char* text_end, ImGuiTextFlags flags) | ||||
|     ImGuiWindow* window = GetCurrentWindow(); | ||||
|     if (window->SkipItems) | ||||
|         return; | ||||
|  | ||||
|     ImGuiContext& g = *GImGui; | ||||
|     IM_ASSERT(text != NULL); | ||||
|  | ||||
|     // Accept null ranges | ||||
|     if (text == text_end) | ||||
|         text = text_end = ""; | ||||
|  | ||||
|     // Calculate length | ||||
|     const char* text_begin = text; | ||||
|     if (text_end == NULL) | ||||
|         text_end = text + strlen(text); // FIXME-OPT | ||||
|   | ||||
		Reference in New Issue
	
	Block a user