Skip to content
Browse files

improve op print_i and print_n output a bit

  • Loading branch information...
1 parent 863e308 commit 9d4e705bf91b2927a262729bf11abc482e11e2cb Jimmy Zhuo committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/m0/c/m0_ops.c
View
4 src/m0/c/m0_ops.c
@@ -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.
Something went wrong with that request. Please try again.