mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Added assert to track stb_textedit.h issue (#715)
This commit is contained in:
		| @@ -7406,6 +7406,7 @@ static void STB_TEXTEDIT_DELETECHARS(STB_TEXTEDIT_STRING* obj, int pos, int n) | |||||||
| static bool STB_TEXTEDIT_INSERTCHARS(STB_TEXTEDIT_STRING* obj, int pos, const ImWchar* new_text, int new_text_len) | static bool STB_TEXTEDIT_INSERTCHARS(STB_TEXTEDIT_STRING* obj, int pos, const ImWchar* new_text, int new_text_len) | ||||||
| { | { | ||||||
|     const int text_len = obj->CurLenW; |     const int text_len = obj->CurLenW; | ||||||
|  |     IM_ASSERT(pos <= text_len); | ||||||
|     if (new_text_len + text_len + 1 > obj->Text.Size) |     if (new_text_len + text_len + 1 > obj->Text.Size) | ||||||
|         return false; |         return false; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user