]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
*** empty log message ***
authorhades <hades>
Fri, 8 Sep 2000 14:59:18 +0000 (14:59 +0000)
committerhades <hades>
Fri, 8 Sep 2000 14:59:18 +0000 (14:59 +0000)
allParam/ca/caParam.c

index 4df3a8e213db88823f7dd1f042319d21f678e80e..a0721b1c41ec3e79a57377ac200e312a7c2d1b4f 100644 (file)
@@ -149,9 +149,17 @@ static void Param_copyToAllocMem(struct event_handler_args args)
                result->maxrows :
                args.count;
        if(args.type == DBR_STRING && args.status == ECA_NORMAL) {
-               for(i = 0 ; i < *(result->rows) ; i++) {
-                       strcpy((result->val)[i], buffer[i]);
+#if 1
+               if(*(result->rows) == 1) {
+                       strcpy(result->val[0], buffer);
+               } else {
+#endif
+                       for(i = 0 ; i < *(result->rows) ; i++) {
+                               strcpy((result->val)[i], buffer[i]);
+                       }
+#if 1
                }
+#endif
        } else {
                Param_strerror((Param *) result->my, ca_message(args.status));
                *(result->rows) = 0;