mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-20 02:47:34 +03:00
windows: Fix panic with some unicode characters (#10750)
Fix #10749 Release Notes: - N/A
This commit is contained in:
parent
ea952b2a95
commit
9863b920b0
@ -928,8 +928,11 @@ impl IDWriteTextRenderer_Impl for TextRenderer {
|
|||||||
) -> windows::core::Result<()> {
|
) -> windows::core::Result<()> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let glyphrun = &*glyphrun;
|
let glyphrun = &*glyphrun;
|
||||||
let desc = &*glyphrundescription;
|
|
||||||
let glyph_count = glyphrun.glyphCount as usize;
|
let glyph_count = glyphrun.glyphCount as usize;
|
||||||
|
if glyph_count == 0 {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
let desc = &*glyphrundescription;
|
||||||
let utf16_length_per_glyph = desc.stringLength as usize / glyph_count;
|
let utf16_length_per_glyph = desc.stringLength as usize / glyph_count;
|
||||||
let context =
|
let context =
|
||||||
&mut *(clientdrawingcontext as *const RendererContext as *mut RendererContext);
|
&mut *(clientdrawingcontext as *const RendererContext as *mut RendererContext);
|
||||||
|
Loading…
Reference in New Issue
Block a user