Changeset 17163


Ignore:
Timestamp:
01/23/14 16:53:13 (11 years ago)
Author:
schlegel
Message:

CHG: add error to Double Mat for arrays that are too large

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/solve/WriteData.m

    r16423 r17163  
    152152
    153153        %first write length of record
    154         fwrite(fid,4+4+8*s(1)*s(2)+4+4,'int');  %2 integers (32 bits) + the double matrix + code + matrix type
     154        recordlength=4+4+8*s(1)*s(2)+4+4; %2 integers (32 bits) + the double matrix + code + matrix type
     155        if recordlength>2^31; error(['field ' EnumToString(enum) ' cannot be marshalled because it is larger than 2^31 bytes!']); end
     156        fwrite(fid,recordlength,'int');
    155157
    156158        %write data code and matrix type:
Note: See TracChangeset for help on using the changeset viewer.