mirror of
https://github.com/postgres/postgres.git
synced 2026-05-27 03:42:28 -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
59919ec776
commit
bdcb85b56a
2 changed files with 2 additions and 2 deletions
|
|
@ -97,7 +97,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->builtin.casemap_full,
|
||||
.init = false,
|
||||
|
|
|
|||
|
|
@ -304,7 +304,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