From: Nishi Date: Fri, 23 Aug 2024 11:00:12 +0000 (+0000) Subject: fix X-Git-Url: https://git.chaotic.ninja/gitweb/nishi/?a=commitdiff_plain;h=4ddd10646bac1bbbc5fa29a8ae0fe7dfaec9371f;p=repoview.git fix git-svn-id: file:///raid/svn-personal/repoview/trunk@65 7e8b2a19-8934-dd40-8cb3-db22cdd5a80f --- diff --git a/CGI/enscript.c b/CGI/enscript.c index 3f565a1..a2a0027 100644 --- a/CGI/enscript.c +++ b/CGI/enscript.c @@ -77,7 +77,6 @@ char* rv_enscript(const char* repouser, const char* path, const char* lang) { } char* newdata = malloc(1); newdata[0] = 0; - free(d); int i; int incr = 0; bool log = false; @@ -100,6 +99,7 @@ char* rv_enscript(const char* repouser, const char* path, const char* lang) { if(oldc == 0) break; } } + free(d); return newdata; } } diff --git a/CGI/theme/modern.c b/CGI/theme/modern.c index e883c2b..825b3e6 100644 --- a/CGI/theme/modern.c +++ b/CGI/theme/modern.c @@ -46,7 +46,7 @@ bool invalid_char(char c) { if(c >= '0' && c <= '9') return false; if(c >= 'a' && c <= 'z') return false; if(c >= 'A' && c <= 'Z') return false; - if(c == '_' && c == '-' && c == '.') return false; + if(c == '_' || c == '-' || c == '.') return false; return true; }