}
GetFromBuffer(&c, 1);
+
m_stream->m_lastcount = 1;
return c;
}
wxInputStream& wxInputStream::operator>>(signed long& i)
{
/* I only implemented a simple integer parser */
- char c;
+ int c;
int sign;
while (isspace( c = GetC() ) )
if (c == '-') {
sign = -1;
c = GetC();
- } else
+ } else if (c == '+') {
sign = 1;
+ c = GetC();
+ } else {
+ sign = 1;
+ }
while (isdigit(c)) {
i = i*10 + c;
wxInputStream& wxInputStream::operator>>(unsigned long& i)
{
/* I only implemented a simple integer parser */
- char c;
+ int c;
while (isspace( c = GetC() ) )
/* Do nothing */ ;
if (c == '-') {
sign = -1;
c = GetC();
- } else
+ } else if (c == '+') {
sign = 1;
+ c = GetC();
+ } else {
+ sign = 1;
+ }
while (isdigit(c)) {
f = f*10 + (c - '0');