diff --git a/source/shell/flash.c b/source/shell/flash.c index 7bd992e..36abf14 100644 --- a/source/shell/flash.c +++ b/source/shell/flash.c @@ -157,7 +157,7 @@ static void do_flash_write(const char *s) return; while (len) { - nbytes = (len > 256) ? 256 : len; + nbytes = min(len, 256); parse_hex(stdin, buf, nbytes); printf("\n"); print_hex_ascii(buf, nbytes);