Index: trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c	(revision 29181)
+++ trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c	(revision 29182)
@@ -539,15 +539,24 @@
 // Create a map between the secfilt values from one photcode table to another
 int *GetSecFiltMap(PhotCodeData *output, PhotCodeData *input) {
-  int i;
+  int i, j;
   int NsecfiltIn  = input[0].Nsecfilt;
+  int NsecfiltOut = output[0].Nsecfilt;
   int *map;
   ALLOCATE(map, int, NsecfiltIn);
 
-  // loop over entries 
+  // loop over entries in the input table
   for (i = 0; i < NsecfiltIn; i++) {
     int code  = input[0].codeNsec[i];
-    int entry = output[0].hashcode[code];
+    int entry = -1;
+    // find the matching entry in the output table
+    for (j = 0; j < NsecfiltOut; j++) {
+      int outcode = output[0].codeNsec[j];
+      if (code == outcode) {
+	 entry = j;
+	 break;
+      }
+    }
     if (entry == -1) {
-      // entry is missing
+      // entry is missing fail (no printfs in this file)
       free(map);
       return(FALSE);
