diff options
-rw-r--r-- | usr.bin/mklocale/yacc.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mklocale/yacc.y b/usr.bin/mklocale/yacc.y index 8437dc3..760d112 100644 --- a/usr.bin/mklocale/yacc.y +++ b/usr.bin/mklocale/yacc.y @@ -479,7 +479,7 @@ add_map(map, list, flag) for (i = r->max+1; i <= list->max; ++i) r->types[i - r->min] = flag; } - r->max = r->max; + r->max = list->max; free(list); } @@ -661,7 +661,7 @@ dump_tables() list->types[x] = htonl(list->types[x]); if (!list->map) { - if (fwrite((char *)&list->types, + if (fwrite((char *)list->types, (list->max - list->min + 1) * sizeof(unsigned long), 1, fp) != 1) { perror(locale_file); |