Skip to content

Commit

Permalink
Fix type conversion error.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuscu committed Nov 7, 2024
1 parent 8dbc48c commit d255e13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/logging/include/logging/String.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ namespace string {
}
~stackstring() = default;

stackstring(const stackstring& other) {
stackstring(const stackstring& other) : stackstring() {
auto size = other.mSize <= mSize ? other.mSize : mSize;
memcpy(mBuf, other.mBuf, size);
memcpy(mBufPtr, &other.mBufPtr, size);
mBuf[size] = 0;
}
stackstring& operator=(const stackstring& other) {
auto size = other.mSize <= mSize ? other.mSize : mSize;
memcpy(mBuf, other.mBuf, size);
memcpy(mBufPtr, other.mBufPtr, size);
mBuf[size] = 0;
return *this;
}
protected:
char mBuf[size];
char mBuf[SIZE];
};

int32_t get_local_timezone();
Expand Down

0 comments on commit d255e13

Please sign in to comment.