Date: Mon, 3 Feb 1997 17:31:00 +0200 (IST) From: Eli Zaretskii To: Pyro Technic cc: djgpp AT delorie DOT com Subject: Re: SIGSEV hates me In-Reply-To: <32F56281.2014@dmv.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 2 Feb 1997, Pyro Technic wrote: > for(j=3; j>=0; ++j) > { > temp = (int)num1 % 10; > digit[j]=temp; This references digit[3], then digit[4], etc., until j overflows to be negative. But even before that it overflows the stack (since digit[], being an automatic variable, is allocated off the stack); hence the Stack Fault message when it crashes.