From 7f3f05f8560e44e586119c69a96efa8af79e289e Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Mon, 3 Jul 2023 17:24:33 +0200 Subject: [PATCH] core: Avoid displaying truncated 64bit values. * src/display.c (display_helper): Use `ltoa' instead of `itoa'. --- src/display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/display.c b/src/display.c index 0d6db3a0..0894b148 100644 --- a/src/display.c +++ b/src/display.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright © 2016,2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -144,7 +144,7 @@ display_helper (struct scm *x, int cont, char *sep, int fd, int write_p) } else if (t == TNUMBER) { - fdputs (itoa (x->value), fd); + fdputs (ltoa (x->value), fd); } else if (t == TPAIR) { @@ -183,7 +183,7 @@ display_helper (struct scm *x, int cont, char *sep, int fd, int write_p) else if (t == TPORT) { fdputs ("#port), fd); + fdputs (ltoa (x->port), fd); fdputs (" ", fd); x = x->string; fdputc ('"', fd); @@ -249,7 +249,7 @@ display_helper (struct scm *x, int cont, char *sep, int fd, int write_p) else { fdputs ("<", fd); - fdputs (itoa (t), fd); + fdputs (ltoa (t), fd); fdputs (":", fd); fdputs (ltoa (cast_voidp_to_long (x)), fd); fdputs (">", fd);