(parse_mappings): Initial "out" member of mapping for CONVERT, fixing
authorBen Pfaff <blp@gnu.org>
Mon, 16 Apr 2007 02:54:49 +0000 (02:54 +0000)
committerBen Pfaff <blp@gnu.org>
Mon, 16 Apr 2007 02:54:49 +0000 (02:54 +0000)
an uninitialized data bug.

src/language/xforms/ChangeLog
src/language/xforms/recode.c

index 461d36dddb6c3e392501a83de1192a4d82cb18e0..84afa3e066607377889b4315b39bb294e381fbce 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-15  Ben Pfaff  <blp@gnu.org>
+
+       * recode.c (parse_mappings): Initialize "out" member of mapping
+       for CONVERT, fixing an uninitialized data bug.
+
 2007-04-15  Ben Pfaff  <blp@gnu.org>
 
        * recode.c (enlarge_dst_widths): Source isn't null-terminated, so
index e7fa44d3f4e2d73a2ae0ad05b5ea10cd8c999129..b0a6b7321bfe137cf03bfd596d168c854c9267f0 100644 (file)
@@ -260,6 +260,7 @@ parse_mappings (struct lexer *lexer, struct recode_trns *trns)
           struct map_in in;
           set_map_in_generic (&in, MAP_CONVERT);
           add_mapping (trns, &map_allocated, &in);
+          set_map_out_num (&trns->mappings[trns->map_cnt - 1].out, 0.0);
               
           dst_type = VAR_NUMERIC;
           if (trns->src_type != VAR_STRING