libgrapheme

unicode string library
git clone git://git.suckless.org/libgrapheme
Log | Files | Refs | README | LICENSE

commit be3430ca6b7d275d3691f126ad65e84d732ebbb1
parent 558b9cc3bc6961d26104cf726fe148f58ba36940
Author: Laslo Hunhold <dev@frign.de>
Date:   Sun, 13 Nov 2022 09:15:33 +0100

Only copy current reorder into test if it is not NULL in bidi-testgen

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
Mgen/bidirectional-test.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gen/bidirectional-test.c b/gen/bidirectional-test.c @@ -333,7 +333,10 @@ test_callback(const char *file, char **field, size_t nfields, fprintf(stderr, "calloc: %s\n", strerror(errno)); exit(1); } - memcpy(test[testlen - 1].reorder, current_reorder, current_reorder_len * sizeof(*(test[testlen - 1].reorder))); + if (current_reorder != NULL) { + memcpy(test[testlen - 1].reorder, current_reorder, + current_reorder_len * sizeof(*(test[testlen - 1].reorder))); + } test[testlen - 1].reorderlen = current_reorder_len; if (current_level_len != test[testlen - 1].cplen) {