mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-28 23:15:27 +00:00
term.c - when in interactive terminal mode and dumping memory using
the 'dump <memtype>' command without any address information, and the end of memory is reached, wrap back around to zero on the next invocation. CHANGELOG - describe changes main.c - update version number git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@157 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
16
term.c
16
term.c
@@ -256,11 +256,17 @@ int cmd_dump(int fd, struct avrpart * p, int argc, char * argv[])
|
||||
|
||||
maxsize = mem->size;
|
||||
|
||||
if (addr > maxsize) {
|
||||
fprintf(stderr,
|
||||
"%s (dump): address 0x%05lx is out of range for %s memory\n",
|
||||
progname, addr, mem->desc);
|
||||
return -1;
|
||||
if (addr >= maxsize) {
|
||||
if (argc == 2) {
|
||||
/* wrap around */
|
||||
addr = 0;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,
|
||||
"%s (dump): address 0x%05lx is out of range for %s memory\n",
|
||||
progname, addr, mem->desc);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* trim len if nessary to not read past the end of memory */
|
||||
|
Reference in New Issue
Block a user