mirror of
https://github.com/thunderbrewhq/bc.git
synced 2025-12-12 01:52:30 +00:00
refactor(unicode): use max address value instead of maximum uint32 value as sentinel value in ConvertUTF16to8
This commit is contained in:
parent
4bea27d25e
commit
05db2d1723
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ static const uint8_t bytesFromUTF8[] = {
|
|||
};
|
||||
|
||||
int32_t ConvertUTF16to8(uint8_t* dst, uint32_t dstmaxchars, const uint16_t* src, uint32_t srcmaxchars, uint32_t* dstchars, uint32_t* srcchars) {
|
||||
auto srcend = srcmaxchars & 0x80000000 ? reinterpret_cast<uint16_t*>(0xFFFFFFFF) : &src[srcmaxchars];
|
||||
auto srcend = srcmaxchars & 0x80000000 ? std::numeric_limits<const uint16_t*>::max() : &src[srcmaxchars];
|
||||
auto dstend = &dst[dstmaxchars];
|
||||
auto dststart = dst;
|
||||
auto srcstart = src;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue