From bf7a6d30bf9243541b9769669ca4f5a07d362c3e Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 9 May 2016 17:34:36 -0400 Subject: testing to see what is causeing extra character --- ws2a/showbug.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ws2a/showbug.c b/ws2a/showbug.c index a92776e..2e57076 100644 --- a/ws2a/showbug.c +++ b/ws2a/showbug.c @@ -16,7 +16,10 @@ int main(){ return 1; } long long last = 0; - fscanf(lastfilenum,"%lld",&last); + if(fscanf(lastfilenum,"%lld",&last) < 1){ + printf("Error finding file id"); + return 1; + } fclose(lastfilenum); long long thisid = 0; sscanf(data,"id=%lld",&thisid); @@ -39,4 +42,5 @@ int main(){ putchar(fgetc(bugfile)); } fclose(bugfile); + return 0; } -- cgit v1.2.3-70-g09d2