IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2011, 11:28:01 AM (15 years ago)
Author:
eugene
Message:

add += and -= to opihi; allow 0 length vectors; fix mem leak in some binary math operations; check and handle some error cases in command.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/VectorOps.c

    r20936 r30614  
    178178  vec[0].Nelements = Nelements;
    179179  if (type == OPIHI_FLT) {
    180     REALLOCATE (vec[0].elements.Flt, opihi_flt, Nelements);
     180    REALLOCATE (vec[0].elements.Flt, opihi_flt, MAX(1, Nelements));
    181181    vec[0].type = OPIHI_FLT;
    182182  } else {
    183     REALLOCATE (vec[0].elements.Int, opihi_int, Nelements);
     183    REALLOCATE (vec[0].elements.Int, opihi_int, MAX(1, Nelements));
    184184    vec[0].type = OPIHI_INT;
    185185  }
Note: See TracChangeset for help on using the changeset viewer.