Andy Koppe wrote:
2009/12/2 jeffunit:

When compiled with
gcc cal.c -o cal
and run with
cal 2009
I get a segmentation fault.
When I uncomment line 62, the program runs successfully.

It's the line after that that has the bug: it's writing to index 432
of a 432-element array.

I disagree -- I uncommented the line to verify, but it's clear
that j<6*72 keeps j within the array.  The program compiles and
runs fine in my up-to-date cygwin 1.7 setup under Windows 7.
There must be something else going on for the OP.

Best wishes -- Eliot Mos

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to