diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2019-07-13 14:54:01 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2019-07-13 14:54:01 +0200 |
commit | 7bbf4ae1401bc6e40f71a32d3f97952796d85690 (patch) | |
tree | 61c3edf1a277547ecd11903427a31cd09cf42b8a /src/regerror.c | |
parent | f883fa5bd37b6420f5dc25027a68289c64028063 (diff) | |
parent | 62c49103a575c79d20d524b36d1b7c4db9515dbf (diff) |
Merge branch 'release/debian/6.9.2-1'debian/6.9.2-1
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) { |