Fix a potential buffer overflow that could be triggered by logging invalid characters to the Dear ImGui console. The incrementation of the loop control variable performed by 'UTF8CharLength' was never validated.