mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 08:20:28 +00:00
memcpy by a constant
This commit is contained in:
parent
c7a114db77
commit
566218ee41
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ string::reserve(size_t c2) noexcept
|
|||
if (!isbig()) {
|
||||
if (!(p2 = (char*)malloc(c2)))
|
||||
__builtin_trap();
|
||||
memcpy(p2, data(), size() + 1);
|
||||
memcpy(p2, data(), __::string_size);
|
||||
} else {
|
||||
if (!(p2 = (char*)realloc(big()->p, c2)))
|
||||
__builtin_trap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue