summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgottox@rootkit.lan <gottox@rootkit.lan>2008-01-01 15:30:04 +0100
committergottox@rootkit.lan <gottox@rootkit.lan>2008-01-01 15:30:04 +0100
commit6a94a6b5ec892789d016af8fd6b99701182fd445 (patch)
tree02599980d96defb84334777917454a7c9c40e269
parent9af11035d3c48ddb52cae2826fda51f71c35167b (diff)
Fixed bugs reported by nsz_
-rw-r--r--smu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/smu.c b/smu.c
index 95028fb..5e49350 100644
--- a/smu.c
+++ b/smu.c
@@ -268,7 +268,7 @@ dolist(const char *begin, const char *end, int newblock) {
putchar('\n');
fputs(ul ? "<ul>\n" : "<ol>\n",stdout);
run = 1;
- for(i = 0; *p && p < end && run; p++) {
+ for(i = 0; p < end && *p && run; p++) {
buffer[0] = '\0';
for(i = 0; *p && p < end && run; p++,i++) {
if(*p == '\n') {
@@ -532,6 +532,7 @@ main(int argc, char *argv[]) {
}
}
process(buffer,buffer+strlen(buffer),1);
+ fclose(source);
free(buffer);
return EXIT_SUCCESS;
}