From be5a7bbe71dbbf80942621546ee276fda9b58093 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Sun, 12 Aug 2012 17:40:08 +0000 Subject: [PATCH] update oc2 --- cf | 2 +- oc2/ocdata.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cf b/cf index 4e67d30e9..4d8962277 100644 --- a/cf +++ b/cf @@ -7,7 +7,7 @@ if test $# != 0 ; then cmds=$@ fi -HDF5=1 +#HDF5=1 DAP=1 #CDMR=1 #RPC=1 diff --git a/oc2/ocdata.c b/oc2/ocdata.c index b37e0d3b7..261f2a955 100644 --- a/oc2/ocdata.c +++ b/oc2/ocdata.c @@ -355,13 +355,22 @@ ocread(OCdata* data, XXDR* xdrs, char* memory, size_t memsize, size_t start, siz /* non-packed fixed length, but memory size < xdrsize */ case OC_Int16: case OC_UInt16: { /* In order to avoid allocating a lot of space, we do this one int at a time */ + /* Remember also that the short is not packed, so its xdr size is twice + its memory size */ xxdr_setpos(xdrs,data->xdroffset+xdrstart); if(scalar) { if(!xxdr_ushort(xdrs,(unsigned short*)memory)) {OCTHROW(OC_EDATADDS); goto xdrfail;} } else { unsigned short* sp = (unsigned short*)memory; for(i=0;i