| delorie.com/archives/browse.cgi | search |
| From: | Jay Dyer <JeDyer AT somtel DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: SIGSEV hates me |
| Date: | Thu, 06 Feb 1997 02:14:54 -0800 |
| Organization: | huh? |
| Lines: | 22 |
| Message-ID: | <32F9AF1E.57D4@somtel.com> |
| References: | <32F56281 DOT 2014 AT dmv DOT com> |
| NNTP-Posting-Host: | dialup-h-6.somtel.com |
| Mime-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Pyro Technic wrote:
> for(j=3; j>=0; ++j)
> {
> temp = (int)num1 % 10;
> digit[j]=temp;
> num1 /= 10;
> num1 -= (temp/10);
> }
Think about the value of j in this loop... 3, 4, 5, 6, 7, etc... you're
trashing all available memory after digit[3]... Sorry it's too late to
be any real help, but I just read it.
--J
p.s. The lesson here is that SIGSEV is commonly the result of trashing
memory in this fashion.
--
/*
Someday I'll come up with a real signature file, honest...
email to: jedyer AT somtel DOT com or jaydyer AT mint DOT net
*/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |