Date: Sun, 6 Jun 2010 11:32:38 +0000 (UTC) From: Gabor Kovesdan <gabor@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208867 - head/usr.bin/dc Message-ID: <201006061132.o56BWcVK028919@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gabor Date: Sun Jun 6 11:32:38 2010 New Revision: 208867 URL: http://svn.freebsd.org/changeset/base/208867 Log: - Fig segmentation fault Submitted by: Hizel Ildar <hizel@vyborg.ru> (via current@) Modified: head/usr.bin/dc/dc.c Modified: head/usr.bin/dc/dc.c ============================================================================== --- head/usr.bin/dc/dc.c Sun Jun 6 06:07:44 2010 (r208866) +++ head/usr.bin/dc/dc.c Sun Jun 6 11:32:38 2010 (r208867) @@ -87,12 +87,16 @@ main(int argc, char *argv[]) while ((ch = getopt_long(argc, argv, "e:f:Vx", long_options, NULL)) != -1) { switch (ch) { case 'e': + if(!preproc_done) + init_bmachine(extended_regs); src_setstring(&src, optarg); reset_bmachine(&src); eval(); preproc_done = true; break; case 'f': + if(!preproc_done) + init_bmachine(extended_regs); procfile(optarg); preproc_done = true; break; @@ -114,7 +118,8 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - init_bmachine(extended_regs); + if (!preproc_done) + init_bmachine(extended_regs); setlinebuf(stdout); setlinebuf(stderr);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006061132.o56BWcVK028919>