mem: fix bug with CopyStringOut and null string termination.

This commit is contained in:
Ali Saidi 2012-05-10 18:04:27 -05:00
parent c02dc07424
commit 041b932428

View 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++;
}