diff options
author | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2007-06-05 14:38:38 +0000 |
---|---|---|
committer | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2007-06-05 14:38:38 +0000 |
commit | a9610ce93272807b0decab0da4cee77482605e46 (patch) | |
tree | f228f52ee2b301ce780c1e5d067c0f9d911ae680 | |
parent | 6a70cfac742d1e41d15ad82952efb3b811a26ab5 (diff) | |
download | mpc-a9610ce93272807b0decab0da4cee77482605e46.tar.gz |
fixed bug found by Rob (sisyphus1@optusnet.com.au)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@53 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | out_str.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -30,6 +30,9 @@ mpc_out_str (FILE *stream, int base, size_t n, mpc_srcptr op, mpc_rnd_t rnd) { size_t size; + if (stream == NULL) + stream = stdout; /* fprintf does not allow NULL as first argument */ + size = mpfr_out_str (stream, base, n, MPC_RE(op), MPC_RND_RE(rnd)); size += fprintf (stream, "+I*"); size += mpfr_out_str (stream, base, n, MPC_IM(op), MPC_RND_IM(rnd)); |