Skip to content

Commit

Permalink
REVERTME: fix minisketch self-copy
Browse files Browse the repository at this point in the history
This has been submitted upstream. See:
sipa/minisketch#87
  • Loading branch information
theuni committed Jun 5, 2024
1 parent 54a034a commit 428932f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/minisketch/include/minisketch.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class Minisketch
/** Make this Minisketch a clone of the specified one. */
Minisketch& operator=(const Minisketch& sketch) noexcept
{
if (sketch.m_minisketch) {
if (this != &sketch && sketch.m_minisketch) {
m_minisketch = std::unique_ptr<minisketch, Deleter>(minisketch_clone(sketch.m_minisketch.get()));
}
return *this;
Expand Down

0 comments on commit 428932f

Please sign in to comment.