Fix length for hl_hb_buffer_add_utf8
This function wants the utf8 length, but text->length does not give this. We can instead use -1 to tell harfbuzz to treat it as null- terminating, which is the case with all hashlink strings anyway.
This commit is contained in:
@@ -271,7 +271,7 @@ namespace lime {
|
||||
|
||||
HL_PRIM void HL_NAME(hl_hb_buffer_add_utf8) (HL_CFFIPointer* buffer, hl_vstring* text, int itemOffset, int itemLength) {
|
||||
|
||||
hb_buffer_add_utf8 ((hb_buffer_t*)buffer->ptr, text ? hl_to_utf8 (text->bytes) : NULL, text ? text->length : 0, itemOffset, itemLength);
|
||||
hb_buffer_add_utf8 ((hb_buffer_t*)buffer->ptr, text ? hl_to_utf8 (text->bytes) : NULL, -1, itemOffset, itemLength);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user