From 6b04f41b59beb7fddbf0c7455197dcc7da93d241 Mon Sep 17 00:00:00 2001 From: Steve Price Date: Fri, 20 Feb 1998 00:47:49 +0000 Subject: [PATCH] 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 --- games/fortune/strfile/strfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c index 19cd02635fa..9b67b6afeef 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);