Changeset 6120b7b in mainline


Ignore:
Timestamp:
2025-04-14T08:37:32Z (5 days ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
2a5d4649
Parents:
6d0e133
Message:

Fix an oversight in str_decode()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/str.c

    r6d0e133 r6120b7b  
    156156static inline int _char_continuation_bytes(char32_t c)
    157157{
     158        if ((c & ~LO_MASK_32(7)) == 0)
     159                return 0;
     160
    158161        if ((c & ~LO_MASK_32(11)) == 0)
    159162                return 1;
     
    223226        /* Determine code length */
    224227
    225         unsigned int cbytes = _continuation_bytes(b0);
    226         unsigned int b0_bits = 6 - cbytes;  /* Data bits in first byte */
     228        int cbytes = _continuation_bytes(b0);
     229        int b0_bits = 6 - cbytes;  /* Data bits in first byte */
    227230
    228231        if (cbytes < 0 || *offset + cbytes > size)
Note: See TracChangeset for help on using the changeset viewer.