summaryrefslogtreecommitdiff
path: root/src/common/unicode_norm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/unicode_norm.c')
-rw-r--r--src/common/unicode_norm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/unicode_norm.c b/src/common/unicode_norm.c
index ab5ce593456..cfea34e30b5 100644
--- a/src/common/unicode_norm.c
+++ b/src/common/unicode_norm.c
@@ -349,6 +349,10 @@ unicode_normalize(UnicodeNormalizationForm form, const pg_wchar *input)
decomp_chars[decomp_size] = '\0';
Assert(decomp_size == current_size);
+ /* Leave if there is nothing to decompose */
+ if (decomp_size == 0)
+ return decomp_chars;
+
/*
* Now apply canonical ordering.
*/