Skip to content

Commit

Permalink
unicoder.cpp light performance improvements (#1586) (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Nov 26, 2022
1 parent a62a0c1 commit 2fd472c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Common/unicoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ void buffer::resize(size_t newSize)
{
if (capacity < newSize)
{
unsigned char *tmp = static_cast<unsigned char *>(realloc(ptr, capacity));
unsigned char *tmp = static_cast<unsigned char *>(realloc(ptr, newSize));
if (tmp == nullptr)
throw std::bad_alloc();
capacity = newSize;
Expand Down

0 comments on commit 2fd472c

Please sign in to comment.