From e25c754918ae26e8b9e68a47bc1af36248e91800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 12 Jul 2019 09:18:14 +0200 Subject: New upstream version 6.9.2 --- src/regerror.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/regerror.c') diff --git a/src/regerror.c b/src/regerror.c index 3fbcdfe..7564827 100644 --- a/src/regerror.c +++ b/src/regerror.c @@ -2,7 +2,7 @@ regerror.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2018 K.Kosako + * Copyright (c) 2002-2019 K.Kosako * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -205,13 +205,17 @@ static void sprint_byte_with_x(char* s, unsigned int v) } static int to_ascii(OnigEncoding enc, UChar *s, UChar *end, - UChar buf[], int buf_size, int *is_over) + UChar buf[], int buf_size, int *is_over) { int len; UChar *p; OnigCodePoint code; - if (ONIGENC_MBC_MINLEN(enc) > 1) { + if (!s) { + len = 0; + *is_over = 0; + } + else if (ONIGENC_MBC_MINLEN(enc) > 1) { p = s; len = 0; while (p < end) { -- cgit v1.2.3