diff --git a/ui/devcmd.c b/ui/devcmd.c index 973aa0b..1a0c95e 100644 --- a/ui/devcmd.c +++ b/ui/devcmd.c @@ -75,7 +75,7 @@ int cmd_md(char **arg) len_text); return -1; } - } else if (offset + length > 0x10000) { + } else if (offset < 0x10000 && offset + length > 0x10000) { length = 0x10000 - offset; }