Changeset 9b4a332 in git


Ignore:
Timestamp:
Oct 23, 2009, 11:58:49 AM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
698fe42860f6adbfb03425b76fe4bc95dd89e1a6
Parents:
a388ae5c0bb2238bcecc75e032fb91a5a79c3b00
Message:
*hannes: handle nx0-intmat


git-svn-id: file:///usr/local/Singular/svn/trunk@12199 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/intvec.cc

    ra388ae r9b4a332  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: intvec.cc,v 1.5 2009-05-15 13:20:05 motsak Exp $ */
     4/* $Id: intvec.cc,v 1.6 2009-10-23 09:58:49 Singular Exp $ */
    55/*
    66* ABSTRACT: class intvec: lists/vectors of integers
     
    5757  col = c;
    5858  int l = r*c;
    59   if ((r>0) && (c>0))
     59  if (l>0) /*(r>0) && (c>0) */
    6060    v = (int *)omAlloc(sizeof(int)*l);
    6161  else
     
    7272#ifndef OM_NDEBUG
    7373  omCheckAddr((void *)this);
    74   omCheckAddr((void *)v);
     74  if (v!=NULL) omCheckAddr((void *)v);
    7575#endif
    7676  StringSetS("");
  • kernel/intvec.h

    ra388ae r9b4a332  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: intvec.h,v 1.8 2009-06-05 05:18:27 motsak Exp $ */
     6/* $Id: intvec.h,v 1.9 2009-10-23 09:58:49 Singular Exp $ */
    77/*
    88* ABSTRACT: class intvec: lists/vectors of integers
     
    3636    row = iv->rows();
    3737    col = iv->cols();
    38     v   = (int *)omAlloc(sizeof(int)*row*col);
    39     for (int i=row*col-1;i>=0; i--)
     38    if (row*col>0)
    4039    {
    41       v[i] = (*iv)[i];
     40      v   = (int *)omAlloc(sizeof(int)*row*col);
     41      for (int i=row*col-1;i>=0; i--)
     42      {
     43        v[i] = (*iv)[i];
     44      }
    4245    }
     46    else v=NULL;
    4347  }
    4448
Note: See TracChangeset for help on using the changeset viewer.