| 33 | |
| 34 | |
| 35 | void STDWString::Set(std::wstring const & s) |
| 36 | { |
| 37 | if (Capacity > 7) { |
| 38 | GameFree(BufPtr); |
| 39 | } |
| 40 | |
| 41 | Size = s.size(); |
| 42 | Capacity = s.size(); |
| 43 | |
| 44 | if (Size > 7) { |
| 45 | // FIXME - memory leak! |
| 46 | BufPtr = GameAlloc<wchar_t>(Capacity + 1); |
| 47 | wcscpy_s(BufPtr, Capacity + 1, s.c_str()); |
| 48 | } else { |
| 49 | wcscpy_s(Buf, 8, s.c_str()); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | CRPGStats_Modifier * ModifierList::GetAttributeInfo(const char * name, int * attributeIndex) const |
| 54 | { |
no test coverage detected