26 lines
940 B
Diff
26 lines
940 B
Diff
|
Index: Text-BibTeX-0.69/btparse/src/format_name.c
|
||
|
===================================================================
|
||
|
--- Text-BibTeX-0.69.orig/btparse/src/format_name.c
|
||
|
+++ Text-BibTeX-0.69/btparse/src/format_name.c
|
||
|
@@ -120,6 +120,8 @@ bt_create_name_format (char * parts, boo
|
||
|
|
||
|
format = (bt_name_format *) malloc (sizeof (bt_name_format));
|
||
|
format->num_parts = num_parts;
|
||
|
+ for (i = 0; i < BT_MAX_NAMEPARTS; i++)
|
||
|
+ part_pos[i] = -2;
|
||
|
for (i = 0; i < num_parts; i++)
|
||
|
{
|
||
|
switch (parts[i])
|
||
|
@@ -904,6 +906,11 @@ dump_format (bt_name_format * format)
|
||
|
|
||
|
for (i = 0; i < BT_MAX_NAMEPARTS; i++)
|
||
|
{
|
||
|
+ int j;
|
||
|
+ for (j = 0; j < format->num_parts; j++)
|
||
|
+ if (i == format->parts[j])
|
||
|
+ break;
|
||
|
+ if (j == format->num_parts) continue;
|
||
|
printf (" %-5s: pre-part=%p (%s), post-part=%p (%s)\n",
|
||
|
nameparts[i],
|
||
|
format->pre_part[i], format->pre_part[i],
|