Index: trunk/Ohana/src/opihi/cmd.data/subset.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/subset.c	(revision 34461)
+++ trunk/Ohana/src/opihi/cmd.data/subset.c	(revision 35109)
@@ -35,5 +35,9 @@
   }
   if ((tvec = SelectVector (out, OLDVECTOR, TRUE)) == NULL) goto error;
-  /* check size of ivec, tvec: must match */
+  if (ivec->Nelements != tvec->Nelements) {
+    /* check size of ivec, tvec: must match */
+    gprint (GP_ERR, "logical expression has different length from input vector\n");
+    goto error;
+  }
 
   // ovec matches ivec in type
