|
From: kc8apf at B. <kc...@ma...> - 2009-05-21 07:12:40
|
Author: kc8apf
Date: 2009-05-21 07:12:32 +0200 (Thu, 21 May 2009)
New Revision: 1870
Modified:
trunk/src/target/target.c
Log:
Author: ?\195?\152yvind Harboe <oyv...@zy...>
- Allow target_read/write_buffer of size 0
Modified: trunk/src/target/target.c
===================================================================
--- trunk/src/target/target.c 2009-05-21 05:07:06 UTC (rev 1869)
+++ trunk/src/target/target.c 2009-05-21 05:12:32 UTC (rev 1870)
@@ -985,6 +985,10 @@
return ERROR_FAIL;
}
+ if (size == 0) {
+ return ERROR_OK;
+ }
+
if ((address + size - 1) < address)
{
/* GDB can request this when e.g. PC is 0xfffffffc*/
@@ -1060,6 +1064,10 @@
return ERROR_FAIL;
}
+ if (size == 0) {
+ return ERROR_OK;
+ }
+
if ((address + size - 1) < address)
{
/* GDB can request this when e.g. PC is 0xfffffffc*/
|