mem: Fix guest corruption when caches handle uncacheable accesses
[gem5.git] / src / mem / fs_translating_port_proxy.cc
index bf0c076c6d94f9260404d4bb2e3358762b536b98..9f1f7d019d5cad5ffa072d2afbb859ac5ba97231 100644 (file)
@@ -140,7 +140,7 @@ CopyStringOut(ThreadContext *tc, char *dst, Addr vaddr, size_t maxlen)
     bool foundNull = false;
     while ((dst - start + 1) < maxlen && !foundNull) {
         vp.readBlob(vaddr++, (uint8_t*)dst, 1);
-        if (dst == '\0')
+        if (*dst == '\0')
             foundNull = true;
         dst++;
     }