diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2019-07-12 09:18:45 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2019-07-12 09:18:45 +0200 |
commit | ed7b90269a529d90d151969348e55347fae02c0d (patch) | |
tree | 7c72e5a49112a844a53a2c10ef1fda47867aee92 /src/regerror.c | |
parent | 6cac1738b6aebf75b29d225775030d291319f9a2 (diff) | |
parent | 5c29b174a11e992dac68553f08645fe4a825c315 (diff) |
Merge branch 'feature/upstream' into develop
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) { |