Browse Source

Fix extra character being reserved in plString::Fill

Michael Hansen 10 years ago
parent
commit
c5f610e3b1
  1. 2
      Sources/Plasma/CoreLib/plString.cpp

2
Sources/Plasma/CoreLib/plString.cpp

@ -838,7 +838,7 @@ std::vector<plString> plString::Split(const char *split, size_t maxSplits) const
plString plString::Fill(size_t count, char c) plString plString::Fill(size_t count, char c)
{ {
plStringBuffer<char> buf; plStringBuffer<char> buf;
char *data = buf.CreateWritableBuffer(count + 1); char *data = buf.CreateWritableBuffer(count);
memset(data, c, count); memset(data, c, count);
data[count] = 0; data[count] = 0;
return buf; return buf;

Loading…
Cancel
Save