diff options
Diffstat (limited to 'src/mem/se_translating_port_proxy.cc')
-rw-r--r-- | src/mem/se_translating_port_proxy.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mem/se_translating_port_proxy.cc b/src/mem/se_translating_port_proxy.cc index 72466655c..7857217f6 100644 --- a/src/mem/se_translating_port_proxy.cc +++ b/src/mem/se_translating_port_proxy.cc @@ -190,15 +190,18 @@ SETranslatingPortProxy::tryReadString(std::string &str, Addr addr) const Addr vaddr = addr; - do { + while (true) { Addr paddr; if (!pTable->translate(vaddr++, paddr)) return false; PortProxy::readBlob(paddr, &c, 1); + if (c == '\0') + break; + str += c; - } while (c); + } return true; } |