+2004-08-14 Jim Evins <evins@snaught.com>
+
+ Fixes for Bug #1008181.
+
+ * src/bc.c: (gl_barcode_default_digits):
+ Make a format of zero digits, harmless.
+ * src/xml-label.c: (xml_parse_object_barcode):
+ Set default value of the format property of barcode objects to 10, not
+ zero. This will prevent crashes when reading pre 2.0.x files.
+
2004-08-09 Jim Evins <evins@snaught.com>
* NEWS:
if (backends[i].can_freeform) {
- return g_strnfill (n, '0');
+ return g_strnfill (MAX (n,1), '0');
} else {
text_flag = gl_xml_get_prop_boolean (node, "text", FALSE);
checksum_flag = gl_xml_get_prop_boolean (node, "checksum", TRUE);
color = gl_xml_get_prop_uint (node, "color", 0);
- format_digits = gl_xml_get_prop_uint (node, "format", 0);
+ format_digits = gl_xml_get_prop_uint (node, "format", 10);
gl_label_barcode_set_props (GL_LABEL_BARCODE(object),
id, text_flag, checksum_flag, format_digits);
gl_label_object_set_line_color (GL_LABEL_OBJECT(object), color);