mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-15 01:18:13 +00:00
[wasm-shape] Don't crash if font is bad
This commit is contained in:
parent
7df9b3dd89
commit
74a2f338c6
1 changed files with 5 additions and 0 deletions
|
@ -425,6 +425,11 @@ retry:
|
|||
{
|
||||
DEBUG_MSG (WASM, module_inst, "Calling shape() failed: %s",
|
||||
wasm_runtime_get_exception (module_inst));
|
||||
if (!buffer->ensure_unicode ())
|
||||
{
|
||||
DEBUG_MSG (WASM, font, "Shape failed but buffer is not in Unicode; failing...");
|
||||
goto fail;
|
||||
}
|
||||
if (retried)
|
||||
{
|
||||
DEBUG_MSG (WASM, font, "Giving up...");
|
||||
|
|
Loading…
Add table
Reference in a new issue