Skip to content

Commit bffe7a7

Browse files
committed
Fixed a crash
1 parent ae632c1 commit bffe7a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/IDAStringList.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ std::string IDAString::ReadA() const
8080
}
8181
}
8282

83-
return std::string((char*)buf.get());
83+
return std::string((char*)buf.get(), m_length);
8484
}
8585

8686
std::wstring IDAString::ReadW() const
8787
{
8888
std::unique_ptr<wchar_t[]> buf(new wchar_t[m_length]);
89-
get_many_bytes(m_address, buf.get(), 256);
89+
get_many_bytes(m_address, buf.get(), m_length);
9090

91-
return std::wstring(buf.get());
91+
return std::wstring(buf.get(), m_length);
9292
}

0 commit comments

Comments
 (0)