diff options
author | steve <steve@FreeBSD.org> | 1998-02-20 00:47:49 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-02-20 00:47:49 +0000 |
commit | f06e5a50b1d5331c31d3065a913517b41042b9eb (patch) | |
tree | 29fd3e962cc0d0233ea924f40d497a19ccc42397 /games/fortune | |
parent | b318e8e53aa4bff38e50fda803053ed3182edf5c (diff) | |
download | FreeBSD-src-f06e5a50b1d5331c31d3065a913517b41042b9eb.zip FreeBSD-src-f06e5a50b1d5331c31d3065a913517b41042b9eb.tar.gz |
Be sure to set the value of Tbl.str_numstr before any call to
do_order or randomize so that they actually work.
PR: 5791
Diffstat (limited to 'games/fortune')
-rw-r--r-- | games/fortune/strfile/strfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c index 19cd026..9b67b6a 100644 --- a/games/fortune/strfile/strfile.c +++ b/games/fortune/strfile/strfile.c @@ -207,6 +207,7 @@ char **av; */ (void) fclose(inf); + Tbl.str_numstr = Num_pts - 1; if (Oflag) do_order(); @@ -230,7 +231,7 @@ char **av; rewind(outf); Tbl.str_version = htonl(Tbl.str_version); - Tbl.str_numstr = htonl(Num_pts - 1); + Tbl.str_numstr = htonl(Tbl.str_numstr); Tbl.str_longlen = htonl(Tbl.str_longlen); Tbl.str_shortlen = htonl(Tbl.str_shortlen); Tbl.str_flags = htonl(Tbl.str_flags); |