From 46d17c5d8e69b60135e77617f5d37f2efce323be Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 12 Dec 2005 05:40:32 +0000 Subject: [PATCH] =?utf8?q?Muestra=20valor=20de=20la=20suma=20sin=20verific?= =?utf8?q?ar=20tambi=C3=A9n.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- pruebas/c/checksum.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pruebas/c/checksum.c b/pruebas/c/checksum.c index bc2b6d3..08b8655 100644 --- a/pruebas/c/checksum.c +++ b/pruebas/c/checksum.c @@ -49,12 +49,16 @@ int main(int argc, char* argv[]) { u16 buf[256]; u8 len; + u16 sum; if (argc < 2) { fprintf(stderr, "Uso: %s string_hexa_con_tamaƱo_multiplo_de_4\n", argv[0]); return 1; } len = strtou16(argv[1], strlen(argv[1]), buf); + sum = chksum(buf, len); + printf("%hX\n", sum); + buf[len++] = sum; printf("%hX\n", chksum(buf, len)); return 0; } -- 2.43.0