mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +00:00
Don't pass a null pointer to memcpy.
Fixes pr23650. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241617 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0148a4c854
commit
51f5a1a8fe
@ -165,8 +165,10 @@ public:
|
||||
if (Size > (size_t)(OutBufEnd - OutBufCur))
|
||||
return write(Str.data(), Size);
|
||||
|
||||
memcpy(OutBufCur, Str.data(), Size);
|
||||
OutBufCur += Size;
|
||||
if (Size) {
|
||||
memcpy(OutBufCur, Str.data(), Size);
|
||||
OutBufCur += Size;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user