Permalink
Browse files

improve op print_i and print_n output a bit

  • Loading branch information...
Jimmy Zhuo
Jimmy Zhuo committed Jun 5, 2012
1 parent 863e308 commit 9d4e705bf91b2927a262729bf11abc482e11e2cb
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/m0/c/m0_ops.c
View
@@ -62,14 +62,14 @@ static void
m0_op_print_i( M0_CallFrame *frame, const unsigned char *ops )
{
/* note the lack of filehandle selection (ops[1]) for output */
- fprintf( stdout, "%ld", (unsigned int)frame->registers[ ops[2] ] );
+ fprintf( stdout, "%ld", (unsigned long)frame->registers[ ops[2] ] );
}
static void
m0_op_print_n( M0_CallFrame *frame, const unsigned char *ops )
{
/* note the lack of filehandle selection (ops[1]) for output */
- fprintf( stdout, "%f", *(double*)&frame->registers[ ops[2] ] );
+ fprintf( stdout, "%.15g", *(double*)&frame->registers[ ops[2] ] );
}
static void

0 comments on commit 9d4e705

Please sign in to comment.