Changeset 10467


Ignore:
Timestamp:
Apr 26, 2011, 6:56:54 PM (9 years ago)
Author:
tbretz
Message:
Disallow C with a number larger than 0 in strict mode - it gives problems.
File:
1 edited

Legend:

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

    r10449 r10467  
    631631        throw runtime_error("Compiled format invalid!");
    632632
     633    if (dat==0)
     634        throw runtime_error("Data pointer == NULL!");
     635
    633636    const char *ptr = reinterpret_cast<const char *>(dat);
    634637
     
    772775
    773776        // if the :N part was not given assume 1
    774         format.second.first = cnt == 0 ? 1: cnt;
     777        format.second.first = cnt == 0 ? 1 : cnt;
     778
     779        if (strict && t[0]=='C' && cnt>0)
     780        {
     781            out << kRed << "Dim doesn't support the format C with N>0!" << endl;
     782            return FormatList();
     783        }
    775784
    776785        // Check if the format is just C (without a number)
Note: See TracChangeset for help on using the changeset viewer.