summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/target/arm_semihosting.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/arm_semihosting.c b/src/target/arm_semihosting.c
index c41c5a00..9b853d9f 100644
--- a/src/target/arm_semihosting.c
+++ b/src/target/arm_semihosting.c
@@ -190,7 +190,7 @@ static int do_semihosting(struct target *target)
} else {
result = read(fd, buf, l);
armv4_5->semihosting_errno = errno;
- if (result > 0) {
+ if (result >= 0) {
retval = target_write_buffer(target, a, result, buf);
if (retval != ERROR_OK) {
free(buf);