Changeset 3684 for trunk/psLib/src/collections/psVector.c
- Timestamp:
- Apr 8, 2005, 7:58:58 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psVector.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psVector.c
r3682 r3684 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-04-0 7 20:27:41$11 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-04-08 17:58:57 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 55 55 psVec->type.dimen = PS_DIMEN_VECTOR; 56 56 psVec->type.type = elemType; 57 psVec->nalloc = nalloc;57 *(int*)&psVec->nalloc = nalloc; 58 58 psVec->n = nalloc; 59 59 … … 81 81 // Realloc after decrementation to avoid accessing freed array elements 82 82 in->data.U8 = psRealloc(in->data.U8, nalloc * elementSize); 83 in->nalloc = nalloc;83 *(int*)&in->nalloc = nalloc; 84 84 } 85 85 … … 108 108 if (byteSize > in->nalloc*PSELEMTYPE_SIZEOF(in->type.type)) { 109 109 in->data.U8 = psRealloc(in->data.U8, byteSize); 110 in->nalloc = n;110 *(int*)&in->nalloc = n; 111 111 } 112 112
Note:
See TracChangeset
for help on using the changeset viewer.
