-rw-r--r-- | html.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -46,5 +46,5 @@ void html_txt(char *txt) { char *t = txt; - while(*t){ + while(t && *t){ int c = *t; if (c=='<' || c=='>' || c=='&') { @@ -69,5 +69,5 @@ void html_ntxt(int len, char *txt) { char *t = txt; - while(*t && len--){ + while(t && *t && len--){ int c = *t; if (c=='<' || c=='>' || c=='&') { @@ -98,5 +98,5 @@ void html_attr(char *txt) { char *t = txt; - while(*t){ + while(t && *t){ int c = *t; if (c=='<' || c=='>' || c=='\'') { @@ -156,3 +156,2 @@ void html_filemode(unsigned short mode) html_fileperm(mode); } - |