]> granicus.if.org Git - nethack/commitdiff
reverse main bit of 'build fix: COMPRESS_OPTIONS'
authorPatR <rankin@nethack.org>
Sun, 19 Feb 2023 02:03:21 +0000 (18:03 -0800)
committerPatR <rankin@nethack.org>
Sun, 19 Feb 2023 02:03:21 +0000 (18:03 -0800)
I realized that I put opts[] inside a block that would go out of
scope while it was still needed.  When I went to fix that, I
discovered that it is already present where it ought to be.  My
'experimentation' should have defined COMPRESS_OPTIONS sooner so
that the outer scope would see it.

This doesn't revert the previous commit because a couple of comments
and a bit of reformatting from it are still useful.

src/files.c

index 995a227265ec7bf8bdecac7a3a9035fdf8a5873b..b3bb6e78bfc3a30f2ca1031ccfc7f3dc5ceda269 100644 (file)
@@ -1393,7 +1393,7 @@ docompress_file(const char *filename, boolean uncomp)
 #ifdef COMPRESS_OPTIONS
     {
         /* we can't guarantee there's only one additional option, sigh */
-        char *opt, opts[sizeof COMPRESS_OPTIONS];
+        char *opt;
         boolean inword = FALSE;
 
         opt = strcpy(opts, COMPRESS_OPTIONS);