From 0cf78c75746614b7ab95b414a3d8d9e1a535ffe4 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 9 May 2016 14:38:21 -0400 Subject: Bug fixes to bug reporter --- ws2a/bugsdata.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ws2a/bugsdata.c') diff --git a/ws2a/bugsdata.c b/ws2a/bugsdata.c index f8951a9..ef15c08 100644 --- a/ws2a/bugsdata.c +++ b/ws2a/bugsdata.c @@ -4,18 +4,21 @@ #include int main(){ + printf("%s%c%c\n", + "Content-Type:text/html;charset=iso-8859-1",13,10); FILE* lastfilenum; - lastfilenum = fopen("../ws2a/bugs/lastbug","r") + lastfilenum = fopen("../ws2a/bugs/lastbug","r"); if(lastfilenum == NULL){ - printf("Error reteriveing bugs, contact the admin!") + printf("Error reteriveing bugs, contact the admin!"); } long long last = 0; fscanf(lastfilenum,"%u",&last); long long end = last-20; while(last > end && last > 0){ char filestring[64]; + char filename[10]; strcat(filestring,"../ws2a/bugs/"); - strcat(filestring,itoa(last)); + strcat(filestring,itoa(last,filename,10)); FILE* thisbug; thisbug = fopen(filestring,"r"); if(thisbug == NULL){ @@ -23,12 +26,9 @@ int main(){ continue; } while(!feof(thisbug)){ - putc(fgetc(thisbug)); + putchar(fgetc(thisbug)); } printf("
"); last--; } - printf("%s%c%c\n", - "Content-Type:text/html;charset=iso-8859-1",13,10); - printf("Data:%s",data); } -- cgit v1.2.3-70-g09d2