We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISWHITESPACE function in String.cpp cause Debug Assertion if non-latin symbol is used
<scxml datamodel="ecmascript" initial="StateShape3" name="ScxmlShape1" version="1.0" xmlns="http://www.w3.org/2005/07/scxml"> <state id="StateShape3" initial="тест"> <transition event="Quit" target="FinalShape1"/> <state id="StateShape2"> <transition cond="! (_event.data=="привет")" event="b" target="тест"/> </state> <state id="тест"> <transition cond="_event.data=="привет"" event="b" target="StateShape2"/> </state> </state> <final id="FinalShape1"/> </scxml>
The next state machine source code cause Debug Assertion Expression: c>=-1 && c<=255 because cyrillic symbols has negative char values
Expression: c>=-1 && c<=255
The problem is in macro ISWHITESPACE from String.cpp
ISWHITESPACE
#define ISWHITESPACE(char) (isspace(char))
#define ISWHITESPACE(symbol) (isspace(static_cast<unsigned char>(symbol)))
template<int (&F)(int)> int safe_ctype(unsigned char c) { return F(c); } //... char c = CHAR_MIN; bool b = safe_ctype<isupper>(c); // No UB.
The text was updated successfully, but these errors were encountered:
Fixes tklab-tud#202
8be7b9c
No branches or pull requests
Example of the problem
ISWHITESPACE function in String.cpp cause Debug Assertion if non-latin symbol is used
The next state machine source code cause Debug Assertion
Expression: c>=-1 && c<=255
because cyrillic symbols has negative char valuesThe problem is in macro
ISWHITESPACE
from String.cppSolution
The text was updated successfully, but these errors were encountered: