Fixed bug for chars with ASCII value > 127, explicitly casting to an unsigned char (Sebastian Gottschalk)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-03-14 14:16:39 +00:00
parent eb61203f6e
commit 2eb37f730d
2 changed files with 19 additions and 19 deletions

View File

@@ -236,7 +236,7 @@ wxPluralFormsScanner::wxPluralFormsScanner(const char* s) : m_s(s)
bool wxPluralFormsScanner::nextToken()
{
wxPluralFormsToken::Type type = wxPluralFormsToken::T_ERROR;
while (isspace(*m_s))
while (isspace((unsigned char) *m_s))
{
++m_s;
}
@@ -244,20 +244,20 @@ bool wxPluralFormsScanner::nextToken()
{
type = wxPluralFormsToken::T_EOF;
}
else if (isdigit(*m_s))
else if (isdigit((unsigned char) *m_s))
{
wxPluralFormsToken::Number number = *m_s++ - '0';
while (isdigit(*m_s))
while (isdigit((unsigned char) *m_s))
{
number = number * 10 + (*m_s++ - '0');
}
m_token.setNumber(number);
type = wxPluralFormsToken::T_NUMBER;
}
else if (isalpha(*m_s))
else if (isalpha((unsigned char) *m_s))
{
const char* begin = m_s++;
while (isalnum(*m_s))
while (isalnum((unsigned char) *m_s))
{
++m_s;
}