Skip to content

cast to unsigned char before std::isspace in ParseTime#2061

Closed
dxbjavid wants to merge 1 commit into
abseil:masterfrom
dxbjavid:parsetime-isspace-cast
Closed

cast to unsigned char before std::isspace in ParseTime#2061
dxbjavid wants to merge 1 commit into
abseil:masterfrom
dxbjavid:parsetime-isspace-cast

Conversation

@dxbjavid
Copy link
Copy Markdown

std::isspace takes a value representable as unsigned char or EOF; sv->front() can yield a negative char when the input starts with a high-bit-set byte.

@derekmauro
Copy link
Copy Markdown
Member

Thanks for this report. I used a different solution consistent with Abseil code and added a test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants