diff options
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r-- | gdb/windows-nat.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 75831d8..cc81a66 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -2411,11 +2411,13 @@ windows_xfer_shared_libraries (struct target_ops *ops, buf = obstack_finish (&obstack); len_avail = strlen (buf); if (offset >= len_avail) - return 0; - - if (len > len_avail - offset) - len = len_avail - offset; - memcpy (readbuf, buf + offset, len); + len= 0; + else + { + if (len > len_avail - offset) + len = len_avail - offset; + memcpy (readbuf, buf + offset, len); + } obstack_free (&obstack, NULL); return len; |