diff --git a/c-programming/reverse-ramdisk.c b/c-programming/reverse-ramdisk.c index 8a4b16d..e7823d0 100644 --- a/c-programming/reverse-ramdisk.c +++ b/c-programming/reverse-ramdisk.c @@ -284,8 +284,9 @@ int tf_read(int ID, size_t offset, void* dest, size_t data_size) { printf("Read: ID = %d, src = %p, size = %zu -> '", ID, dest, data_size); for (size_t i = 0; i < data_size; i++) - printf("0x%02" PRIX8 " ", *((uint8_t*)((uint8_t*)dest + i))); - printf("'\n"); + printf("0x%02" PRIX8 "%c", *((uint8_t*)((uint8_t*)dest + i)), + i == (data_size - 1) ? '\'' : ' '); + printf("\n"); fflush(stdout); #endif