Hugs on Linux/PPC

Michele Campeotto micampe@micampe.it
Tue, 23 Jul 2002 15:27:50 +0200


   I tried to investigate some more and found that the problem is at 
line 515-516 of input.c:

     lineBuffer[lineLength] = fgetc(inputStream);
     if (lineBuffer[lineLength] == EOF)
         break;

this line is checking a char with EOF, which is -1, while it should 
check the int returned by fgetc against EOF.
   I fixed the problem using a little hack:

     int c = fgetc(inputStream);
     lineBuffer[lineLength] = c;
     if (c == EOF)
         break;

   This probably isn't the correct solution, but at least it makes hugs 
work for me. :)


   Cheers

-- 
   Michele - www.micampe.it

   "Smile, it makes people wonder what you are thinking"