summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/iaudio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/iaudio.c b/tools/iaudio.c
index 2c59b3cd55..715b3b6d23 100644
--- a/tools/iaudio.c
+++ b/tools/iaudio.c
@@ -59,7 +59,7 @@ int main (int argc, char* argv[]) {
/* print old checksum */
fseek (pFile, CHECKSUM_BIT, SEEK_SET);
byte = fgetc(pFile);
- printf("Old checksum: 0x%02x\n", (unsigned char) byte);
+ printf("Old checksum: 0x%02x\n", byte & 0xff);
/* get file size*/
fseek(pFile,0,SEEK_END);
@@ -85,7 +85,7 @@ int main (int argc, char* argv[]) {
for (i = CHECKSUM_START; i < length; i++) {
checksum += inbuf[i];
}
- printf("New checksum: 0x%02x\n", (unsigned char) checksum);
+ printf("New checksum: 0x%02x\n", checksum & 0xff);
/* save new checksum */
inbuf[CHECKSUM_BIT] = (unsigned char) checksum;