Skip to content

Commit ae55a0c

Browse files
committed
Fix off-by-one index error
1 parent 2618fae commit ae55a0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cppcore/Common/TStringBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ inline void TStringBase<T>::copyFrom(TStringBase<T> &base, const T *ptr, size_t
178178
targetPtr = base.mStringBuffer;
179179
}
180180
memcpy(targetPtr, ptr, size * sizeof(T));
181-
targetPtr[size + 1] = '\0';
181+
targetPtr[size] = '\0';
182182
base.mSize = size;
183183
}
184184

0 commit comments

Comments
 (0)