From 3b479b2028a94c9cf5a65da6069917e289d4ce06 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 16 Apr 1998 21:16:09 +0000 Subject: [PATCH] allow copies of less than the number of elements returned --- src/gdd/dbMapper.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gdd/dbMapper.cc b/src/gdd/dbMapper.cc index 977d51b51..204d0fb09 100644 --- a/src/gdd/dbMapper.cc +++ b/src/gdd/dbMapper.cc @@ -4,6 +4,9 @@ // $Id$ // // $Log$ +// Revision 1.18 1997/08/05 00:51:09 jhill +// fixed problems in aitString and the conversion matrix +// // Revision 1.17 1997/04/23 17:12:55 jhill // fixed export of symbols from WIN32 DLL // @@ -190,17 +193,17 @@ static int mapGddToString(void* vd, aitIndex count, gdd* dd) { void* v=dd->dataVoid(); int status; - if (count==sz) { + if (count<=sz) { if(local_data_format==aitLocalDataFormat) { if((aitFixedString*)v!=db) { - status = aitConvert(aitEnumFixedString,db,dd->primitiveType(),v,sz); + status = aitConvert(aitEnumFixedString,db,dd->primitiveType(),v,count); } else { status = sz*sizeof(aitFixedString); } } else { - status = aitConvertToNet(aitEnumFixedString,db,dd->primitiveType(),v,sz); + status = aitConvertToNet(aitEnumFixedString,db,dd->primitiveType(),v,count); } } else { @@ -485,7 +488,6 @@ static gdd* mapStsStringToGdd(void* v,aitIndex count) static int mapStsGddToString(void* v, aitIndex count, gdd* dd) { - // what about arrays of string? is this allowed? dbr_sts_string* db = (dbr_sts_string*)v; aitFixedString* dbv = (aitFixedString*)db->value;