diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-04-19 16:40:25 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-04-19 16:40:25 +0900 |
commit | 3eac2459815c0826d811ed808e5d7687c03638b8 (patch) | |
tree | f0f81c3510c10695c86cc5c9cd323d2de61c5043 /example-fs-bb48 | |
parent | 7c2cdaa6e40999d1194cc7188742f0c21acfa0da (diff) |
fix
Diffstat (limited to 'example-fs-bb48')
-rw-r--r-- | example-fs-bb48/sample.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/example-fs-bb48/sample.c b/example-fs-bb48/sample.c index f1c19e5..1054315 100644 --- a/example-fs-bb48/sample.c +++ b/example-fs-bb48/sample.c @@ -143,6 +143,7 @@ const size_t __stacksize_intr = (size_t)&__process3_stack_size__; static char hexchar (uint8_t x) { + x &= 0x0f; if (x <= 0x09) return '0' + x; else if (x <= 0x0f) @@ -226,7 +227,7 @@ main (int argc, const char *argv[]) s[1] = hexchar (size & 0x0f); for (i = 0; i < size; i++) - crc32_u8 (s + 4 + i); + crc32_u8 (s[4 + i]); value = crc32_value () ^ 0xffffffff; s[4] = hexchar (value >> 28); s[5] = hexchar (value >> 24); |