Skip to content

byte count vs wchar count problem #2

@toadhammer

Description

@toadhammer
inline std::wstring Reader::MatchNumber(InputStream& inputStream)
{
   const wchar_t sNumericChars[] = L"0123456789.eE-+";
   std::set<wchar_t> numericChars;
   numericChars.insert(sNumericChars, sNumericChars + sizeof(sNumericChars));

Insert should not use sizeof(array), rather use sizeof( array ) / sizeof(wchar_t)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions