hirc

IRC client
Log | Files | Refs

commit 389eb3bdaa5409f2556b2c3f331e0577670de24a
parent af0a0195b419a2146fd2a6afc4b95906a855f9e3
Author: hhvn <dev@hhvn.uk>
Date:   Thu, 21 Apr 2022 20:09:11 +0100

Merge branch 'master' of hhvn.uk:git/hirc

Diffstat:
MMakefile | 2+-
Msrc/config.c | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -79,7 +79,7 @@ install: all install -m0755 $(BIN) $(BINDIR)/$(BIN) sed 's/COMMIT/$(COMMIT)/' \ < $(MAN) \ - > $(MANDIR)/man1/$(MAN) + > $(MANDIR)/man1/`basename $(MAN)` uninstall: -rm -f $(BINDIR)/$(BIN) diff --git a/src/config.c b/src/config.c @@ -1481,7 +1481,7 @@ inval: void config_read(char *filename) { - static char **bt; + static char **bt = NULL; static int btoffset = 0; char buf[8192]; char *path; @@ -1494,9 +1494,9 @@ config_read(char *filename) { path = realpath(filename, NULL); /* Check if file is already being read */ - if (bt) { + if (bt && btoffset) { for (i = 0; i < btoffset; i++) { - if (strcmp(path, *(bt + i)) == 0) { + if (strcmp_n(path, *(bt + i)) == 0) { ui_error("recursive read of '%s' is not allowed", filename); pfree(&path); return;