Skip to content
Permalink
Browse files
Ignore blank lines.
--HG--
branch : calculator-experiment
  • Loading branch information
icculus committed Feb 8, 2010
1 parent 6735007 commit 8c720f9ec2d698ccd56056e684b95128d1234526
Showing with 3 additions and 1 deletion.
  1. +3 −1 calculator.c
@@ -539,7 +539,9 @@ int main(int argc, char **argv)

while ((ln = fgetln(io, &len)) != NULL)
{
if ((len == 5) && (memcmp(ln, "quit\n", 5) == 0))
if (len == 1)
continue;
else if ((len == 5) && (memcmp(ln, "quit\n", 5) == 0))
break;
else if ((len == 2) && (memcmp(ln, "q\n", 2) == 0))
break;

0 comments on commit 8c720f9

Please sign in to comment.