Fix bug in casemapping long strings.
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 27 Jul 2009 17:41:25 +0000 (19:41 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 27 Jul 2009 17:41:25 +0000 (19:41 +0200)
Thanks to Ben Pfaff for pointing out the error.

src/data/case-map.c

index 411b9f0d49904cc118f3052c35c096c70c0e8376..49297d1349f5c50661e904408f6135684786e710 100644 (file)
@@ -100,7 +100,7 @@ case_map_execute (const struct case_map *map, struct ccase *src)
         {
           int src_idx = map->map[dst_idx];
           if (src_idx != -1)
-            *case_data_rw_idx (dst, dst_idx) = *case_data_idx (src, src_idx);
+           value_copy (case_data_rw_idx (dst, dst_idx), case_data_idx (src, src_idx), caseproto_get_width (map->proto, dst_idx));
         }
       case_unref (src);
       return dst;