You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The template type Iterator is used throughout double-conversion.cpp. It appears that Iterator can be one of two types:
const uc16*
const char*
There is a function Advance whose signature is:
template<classIterator>
staticboolAdvance (Iterator* it, char separator, int base, Iterator& end)
The call sites look like this:
// current is of type IteratorAdvance(¤t, separator_, 10, end)
The problem is that separator_ is being downcast to a char even when using the uc16* template type for the string. The implication is that there is a possible loss of information; for example, the separator might be a Unicode code point that doesn't fit in a char. A great real-life example could be 'NARROW NO-BREAK SPACE' (U+202F), which is now used in CLDR as the default grouping separator in France.
The code should be checked to ensure that separator_ is not downcast to a char unless the iterator is a char iterator.
The text was updated successfully, but these errors were encountered:
The template type
Iterator
is used throughout double-conversion.cpp. It appears thatIterator
can be one of two types:const uc16*
const char*
There is a function
Advance
whose signature is:The call sites look like this:
The problem is that
separator_
is being downcast to achar
even when using theuc16*
template type for the string. The implication is that there is a possible loss of information; for example, the separator might be a Unicode code point that doesn't fit in a char. A great real-life example could be 'NARROW NO-BREAK SPACE' (U+202F), which is now used in CLDR as the default grouping separator in France.The code should be checked to ensure that
separator_
is not downcast to achar
unless the iterator is achar
iterator.The text was updated successfully, but these errors were encountered: