diff --git a/puzzle1 b/puzzle1 index 46921dc..bc88db7 100755 Binary files a/puzzle1 and b/puzzle1 differ diff --git a/puzzle1.c b/puzzle1.c index 9ac25bd..326a29b 100644 --- a/puzzle1.c +++ b/puzzle1.c @@ -11,10 +11,16 @@ char stringTwo[stringSize]; int readIntoList(char* stringList){ int index = 0; - while (getchar()=='\n'){ - //eat up new lines in buffer - } - + while(1){ + char next = getchar(); + if (next != '\n'){ + stringList[index] = next; + index++; + }else{ + break; + } + } + while (1) { readChar = getchar(); stringList[index] = readChar;