mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
CharacterFunctions: Avoid UB when parsing hex strings
This commit is contained in:
parent
6d3504adfa
commit
6244fc293f
4 changed files with 9 additions and 6 deletions
|
|
@ -166,7 +166,7 @@ IPAddress::IPAddress (const String& adr)
|
|||
}
|
||||
|
||||
IPAddressByteUnion temp;
|
||||
temp.combined = (uint16) CharacterFunctions::HexParser<int>::parse (tokens[i].getCharPointer());
|
||||
temp.combined = CharacterFunctions::HexParser<uint16>::parse (tokens[i].getCharPointer());
|
||||
|
||||
address[i * 2] = temp.split[0];
|
||||
address[i * 2 + 1] = temp.split[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue