~sircmpwn/gmni

78fe3fbb2bc3a8e3228a51aed1f203e521cdf845 — RenĂ© Wagner 3 years ago ff46c84
fix wrong path length check and error message
1 files changed, 2 insertions(+), 2 deletions(-)

M src/util.c
M src/util.c => src/util.c +2 -2
@@ 82,9 82,9 @@ download_resp(FILE *out, struct gemini_response resp, const char *path,
		}
		break;
	default:
		if (strlen(path_buf) > PATH_MAX) {
		if (strlen(path) > PATH_MAX) {
			fprintf(stderr, "Path %s exceeds limit of %d bytes\n",
				path_buf, PATH_MAX);
				path, PATH_MAX);
			return 1;
		}
		strcpy(path_buf, path);