Date: Thu, 13 May 2004 21:24:17 -0500 From: Larry Rosenman <ler@lerctr.org> To: "Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu> Cc: freebsd-current@freebsd.org Subject: Re: strtod vs NAN? Message-ID: <D87E1560D4C5C3A8BEAD2B25@lerlaptop.lerctr.org> In-Reply-To: <1084501282.6477.11.camel@rushlight.kf8nh.com> References: <9AE9B859FD197218F21D81D0@lerlaptop.lerctr.org> <1084501282.6477.11.camel@rushlight.kf8nh.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] --On Thursday, May 13, 2004 22:21:23 -0400 "Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu> wrote: > On Thu, 2004-05-13 at 22:14, Larry Rosenman wrote: >> char **ptr; >> >> num=strtod(input,ptr); > > Since ptr is uninitialized, strtod() is trying to store a pointer into > random memory. You probably want to say this instead: > > char *ptr; > > num = strtod(input, &ptr); Thanks. Stupid C error(s) from a novice :). That was indeed it. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFApC3SrRNGhTxJvdYRAtosAJ97qw3ex16sqM5PDbmigoIwgpGMCACeLyhb ZUzKkHFHa3O3RXSbH5U9ZZY= =Sr84 -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D87E1560D4C5C3A8BEAD2B25>
