IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38692


Ignore:
Timestamp:
Aug 31, 2015, 2:19:14 PM (11 years ago)
Author:
eugene
Message:

gfits_fread_ftable_range will reallocate the table buffer if it already exists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/libfits/table/F_read_T.c

    r38441 r38692  
    7979  Nskip = start * Nx;
    8080  Nbytes = Nrows * Nx;
    81   ALLOCATE (table[0].buffer, char, MAX (Nbytes, 1));
     81
     82  if (table[0].buffer) {
     83    if (table[0].datasize < Nbytes) {
     84      REALLOCATE (table[0].buffer, char, MAX (Nbytes, 1));
     85    }
     86  } else {
     87    ALLOCATE (table[0].buffer, char, MAX (Nbytes, 1));
     88  }
    8289
    8390  fseeko (f, Nskip, SEEK_CUR);
Note: See TracChangeset for help on using the changeset viewer.