diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-03 20:50:11 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-03 20:50:11 +0100 |
commit | 4cf52fc0bc3b80c0ef6c58c5db4413ebdafe661c (patch) | |
tree | 676b26b024117cf656080a011e3d17b8fb6889af /lib/uninorm/uninorm-filter.c | |
parent | 1ecbfbb92248e67b564f5b144c4671ccaa86ee2f (diff) | |
parent | 44ff3127b1e57b703c2a73a24f7ab38e4aad8ae4 (diff) |
Merge branch 'release/0.9.8-1'0.9.8-1
Diffstat (limited to 'lib/uninorm/uninorm-filter.c')
-rw-r--r-- | lib/uninorm/uninorm-filter.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/uninorm/uninorm-filter.c b/lib/uninorm/uninorm-filter.c index c6db051..f29dece 100644 --- a/lib/uninorm/uninorm-filter.c +++ b/lib/uninorm/uninorm-filter.c @@ -1,5 +1,5 @@ /* Stream-based normalization of Unicode strings. - Copyright (C) 2009-2016 Free Software Foundation, Inc. + Copyright (C) 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2009. This program is free software: you can redistribute it and/or @@ -22,7 +22,7 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ + along with this program. If not, see <https://www.gnu.org/licenses/>. */ #include <config.h> @@ -140,7 +140,7 @@ uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc_arg) { /* Cache sortbuf and sortbuf_count in local register variables. */ - struct ucs4_with_ccc * const sortbuf = filter->sortbuf; + struct ucs4_with_ccc *sortbuf = filter->sortbuf; size_t sortbuf_count = filter->sortbuf_count; int i; @@ -261,9 +261,11 @@ uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc_arg) if (filter->sortbuf != filter->sortbuf_preallocated) free (filter->sortbuf); filter->sortbuf = new_sortbuf; + /* Update cache of filter->sortbuf. */ + sortbuf = filter->sortbuf; } - filter->sortbuf[sortbuf_count].code = uc; - filter->sortbuf[sortbuf_count].ccc = ccc; + sortbuf[sortbuf_count].code = uc; + sortbuf[sortbuf_count].ccc = ccc; sortbuf_count++; } |