mirror of
https://github.com/postgres/postgres.git
synced 2026-05-22 10:22:10 -04:00
Fix callers of unicode_strtitle() using srclen == -1.
Currently, only called that way in tests, which failed to fail. Discussion: https://postgr.es/m/581a72ff452bb045ba83bbe3c6cf4467702d4f0f.camel@j-davis.com Backpatch-through: 18
This commit is contained in:
parent
16fb94605c
commit
6044f55a47
2 changed files with 2 additions and 2 deletions
|
|
@ -91,7 +91,7 @@ strtitle_builtin(char *dest, size_t destsize, const char *src, ssize_t srclen,
|
|||
{
|
||||
struct WordBoundaryState wbstate = {
|
||||
.str = src,
|
||||
.len = srclen,
|
||||
.len = (srclen < 0) ? strlen(src) : srclen,
|
||||
.offset = 0,
|
||||
.posix = !locale->info.builtin.casemap_full,
|
||||
.init = false,
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ tfunc_title(char *dst, size_t dstsize, const char *src,
|
|||
{
|
||||
struct WordBoundaryState wbstate = {
|
||||
.str = src,
|
||||
.len = srclen,
|
||||
.len = (srclen < 0) ? strlen(src) : srclen,
|
||||
.offset = 0,
|
||||
.init = false,
|
||||
.prev_alnum = false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue