Changeset 4246


Ignore:
Timestamp:
06/25/10 17:54:43 (15 years ago)
Author:
Mathieu Morlighem
Message:

fixed segfault (thanks to my freind valgrind)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Patch.cpp

    r4236 r4246  
    4848        //allocate and fill with NaN:
    4949        this->values=(double*)xmalloc(this->numcols*this->numrows*sizeof(double));
    50         for(i=0;i<this->numcols;i++){
    51                 for(j=0;j<this->numrows;j++){
    52                         *(this->values+i*this->numcols+j)=NAN;
     50        for(i=0;i<this->numrows;i++){
     51                for(j=0;j<this->numcols;j++){
     52                        this->values[i*this->numcols+j]=NAN;
    5353                }
    5454        }
Note: See TracChangeset for help on using the changeset viewer.