]> granicus.if.org Git - nethack/commit
fix 'makedefs -z' for config using FILE_PREFIX
authorPatR <rankin@nethack.org>
Tue, 23 Jan 2018 08:52:57 +0000 (00:52 -0800)
committerPatR <rankin@nethack.org>
Tue, 23 Jan 2018 08:52:57 +0000 (00:52 -0800)
commit32890d1bc1cc8d48cdd31ffb17373b917edfb267
treeb53dada3e11febfd10eec83d3fd67f1d6d908f30
parenta40f0788bc94f9891f3a5723878c20d2a65d085c
fix 'makedefs -z' for config using FILE_PREFIX

Apply user-contributed patch to make do_vision() handle FILE_PREFIX
correctly.  It was putting that value into the filename buffer, then
overwriting it with the ordinary filename instead of appending.

Deletion of just-made vis_tab.h when creation of vis_tab.c fails would
have failed too if FILE_PREFIX had been working.

The patch was against 3.4.3 and didn't apply cleanly to current code,
but it is a staightforward fix, although the file deletion case was
buggy (failed to clear "vis_tab.c" from buffer before reconstructing
"vis_tab.h" via appending stuff).  FILE_PREFIX seems to be Amiga-only
so I've only tested the usual case where it isn't defined.
doc/fixes36.1
util/makedefs.c