diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2019-07-12 09:18:14 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2019-07-12 09:18:14 +0200 |
commit | e25c754918ae26e8b9e68a47bc1af36248e91800 (patch) | |
tree | d21952fcb2767620c25d4d5b412b8c4829ca96bc /src/regerror.c | |
parent | 70de057dbb5ea79536834e156f534279347f96f3 (diff) |
New upstream version 6.9.2upstream/6.9.2
Diffstat (limited to 'src/regerror.c')
-rw-r--r-- | src/regerror.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 <sndgk393 AT ybb DOT ne DOT jp> + * Copyright (c) 2002-2019 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> * 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) { |