From: wdenk Date: Tue, 8 Feb 2005 15:29:01 +0000 (+0000) Subject: Fix yet another recently introduced bug. X-Git-Tag: LABEL_2006_03_12_0025~365 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b9649854f6ffdeaad23daec21013552cef2e05f0;p=u-boot Fix yet another recently introduced bug. --- diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 915ee76361..1cc88e3e50 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -450,11 +450,12 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) checksum = ntohl(hdr->ih_hcrc); hdr->ih_hcrc = 0; - if (crc32 (0, (char *)&hdr, sizeof(image_header_t)) != checksum) { + if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) { puts ("\n** Bad Header Checksum **\n"); SHOW_BOOT_PROGRESS (-2); return 1; } + hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */ print_image_hdr (hdr);