Changeset 11041 for trunk/FACT++/src


Ignore:
Timestamp:
06/16/11 19:55:33 (13 years ago)
Author:
tbretz
Message:
Replaced interpretation of single characters by the interpretation of unsigned numbers (uint8_t)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Converter.cc

    r11027 r11041  
    537537            case 'x': GetBinImp(data, Get<long long>(line)); break;
    538538            case 'c':
    539                 if (line.peek()==-1)
    540539                {
    541                     line.clear(ios::failbit|ios::eofbit);
    542                     break;
     540                    const unsigned short val = Get<unsigned short>(line);
     541                    if (val>255)
     542                        line.setstate(ios::failbit);
     543                    GetBinImp(data, static_cast<unsigned char>(val));
    543544                }
    544                 GetBinImp(data, Get<unsigned char>(line));
    545                 if (line.peek()==-1)
    546                     line.clear(ios::eofbit);
    547545                break;
    548546            case 'N':
Note: See TracChangeset for help on using the changeset viewer.