From bb5abea645a31832e9d6a94cea09714a9b1632e3 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 19 Nov 2023 11:55:23 +0100 Subject: Fixed bug in tests with different architectures --- test/023_io_LST_write/io_LST_tests.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/023_io_LST_write') diff --git a/test/023_io_LST_write/io_LST_tests.c b/test/023_io_LST_write/io_LST_tests.c index 3f42d7a..45cc203 100644 --- a/test/023_io_LST_write/io_LST_tests.c +++ b/test/023_io_LST_write/io_LST_tests.c @@ -8,11 +8,13 @@ cube_t readcube(char *, char *); void writecube(char *, cube_t, char *); int main(void) { - char *c, str[STRLENMAX]; + char str[STRLENMAX], *aux; cube_t cube; - for (c = str; (*c = getchar()) != EOF; c++) ; - *c = '\0'; + aux = str; + while (fgets(aux, STRLENMAX, stdin) != NULL) + while (*aux != '\n') + aux++; cube = readcube("H48", str); -- cgit v1.3