Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Data/DataRow.cpp (1 of 27 files). Show all
Unified · Split
| @@ -630,7 +630,7 @@ void DataRow::SetStringValue(const int32_t columnIndex, const Nullable<string>& · 629 unmodified lines | ||
| 630 | 630 | if (value.HasValue()) |
| 631 | 631 | { |
| 632 | 632 | const string& strval = value.GetValueOrDefault(); |
| 633 | − const int32_t length = strval.size() + 1; | |
| 633 | + const uint32_t length = ConvertUInt32(strval.size() + 1); | |
| 634 | 634 | char* copy = static_cast<char*>(malloc(length * sizeof(char))); |
| 635 | 635 | strcpy_s(copy, length, strval.c_str()); |
| 636 | 636 | m_values[columnIndex] = copy; |
| @@ -782,7 +782,7 @@ void DataRow::SetDecimalValue(const int32_t columnIndex, const Nullable<decimal_ · 145 unmodified lines | ||
| 782 | 782 | // The boost decimal type has a very complex internal representation, |
| 783 | 783 | // although slower, it's safer just to store this as a string for now |
| 784 | 784 | const string& strval = value.GetValueOrDefault().str(); |
| 785 | − const int32_t length = strval.size() + 1; | |
| 785 | + const uint32_t length = ConvertUInt32(strval.size() + 1); | |
| 786 | 786 | char* copy = static_cast<char*>(malloc(length * sizeof(char))); |
| 787 | 787 | strcpy_s(copy, length, strval.c_str()); |
| 788 | 788 | m_values[columnIndex] = copy; |