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:
@@ -236,7 +236,7 @@ wxPluralFormsScanner::wxPluralFormsScanner(const char* s) : m_s(s)
|
|||||||
bool wxPluralFormsScanner::nextToken()
|
bool wxPluralFormsScanner::nextToken()
|
||||||
{
|
{
|
||||||
wxPluralFormsToken::Type type = wxPluralFormsToken::T_ERROR;
|
wxPluralFormsToken::Type type = wxPluralFormsToken::T_ERROR;
|
||||||
while (isspace(*m_s))
|
while (isspace((unsigned char) *m_s))
|
||||||
{
|
{
|
||||||
++m_s;
|
++m_s;
|
||||||
}
|
}
|
||||||
@@ -244,20 +244,20 @@ bool wxPluralFormsScanner::nextToken()
|
|||||||
{
|
{
|
||||||
type = wxPluralFormsToken::T_EOF;
|
type = wxPluralFormsToken::T_EOF;
|
||||||
}
|
}
|
||||||
else if (isdigit(*m_s))
|
else if (isdigit((unsigned char) *m_s))
|
||||||
{
|
{
|
||||||
wxPluralFormsToken::Number number = *m_s++ - '0';
|
wxPluralFormsToken::Number number = *m_s++ - '0';
|
||||||
while (isdigit(*m_s))
|
while (isdigit((unsigned char) *m_s))
|
||||||
{
|
{
|
||||||
number = number * 10 + (*m_s++ - '0');
|
number = number * 10 + (*m_s++ - '0');
|
||||||
}
|
}
|
||||||
m_token.setNumber(number);
|
m_token.setNumber(number);
|
||||||
type = wxPluralFormsToken::T_NUMBER;
|
type = wxPluralFormsToken::T_NUMBER;
|
||||||
}
|
}
|
||||||
else if (isalpha(*m_s))
|
else if (isalpha((unsigned char) *m_s))
|
||||||
{
|
{
|
||||||
const char* begin = m_s++;
|
const char* begin = m_s++;
|
||||||
while (isalnum(*m_s))
|
while (isalnum((unsigned char) *m_s))
|
||||||
{
|
{
|
||||||
++m_s;
|
++m_s;
|
||||||
}
|
}
|
||||||
|
@@ -949,7 +949,7 @@ bool wxTarInputStream::ReadExtendedHeader(wxTarHeaderRecords*& recs)
|
|||||||
|
|
||||||
// read the record size (byte count in ascii decimal)
|
// read the record size (byte count in ascii decimal)
|
||||||
recSize = 0;
|
recSize = 0;
|
||||||
while (isdigit(*p))
|
while (isdigit((unsigned char) *p))
|
||||||
recSize = recSize * 10 + *p++ - '0';
|
recSize = recSize * 10 + *p++ - '0';
|
||||||
|
|
||||||
// validity checks
|
// validity checks
|
||||||
|
Reference in New Issue
Block a user