From c293f725e55661ae690b52d5e8339e48b07a6a85 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 22 Dec 2024 18:08:14 +0300 Subject: fixed crashes while setting special Q-Registers with EU (string-building characters) * The teco_qreg_vtable_t::get_string() method should support returning the length optionally (may be NULL). This already worked with teco_doc_get_string(), even though it wasn't documented, and therefore didn't cause problems with regular Q-Registers. --- src/doc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/doc.c') diff --git a/src/doc.c b/src/doc.c index a1ebe2c..019603a 100644 --- a/src/doc.c +++ b/src/doc.c @@ -176,7 +176,8 @@ teco_doc_undo_set_string(teco_doc_t *ctx) * @param str Pointer to a variable to hold the return string. * It can be NULL if you are interested only in the string's length. * Strings must be freed via g_free(). - * @param len Where to store the string's length (mandatory). + * @param len Where to store the string's length or NULL + * if that information is not necessary. * @param codepage Where to store the document's codepage or NULL * if that information is not necessary. * -- cgit v1.2.3