summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-02-15 21:39:01 +0100
committerCarl Hetherington <cth@carlh.net>2025-02-15 23:13:16 +0100
commite0eddc91d0cd2bef980f011310f8addfa0723439 (patch)
tree732b9457b87bd5aeff1d859ad4f22d0daaa14adc
parent706af733829a584734a833ff25b52ced67ac87c5 (diff)
Fix self-reference check in File::operator=2972-short-read
-rw-r--r--src/file.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file.cc b/src/file.cc
index 36102f72..1ee11bf5 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -82,7 +82,7 @@ File::File(File&& other)
File&
File::operator=(File&& other)
{
- if (*this != other) {
+ if (this != &other) {
close();
_file = other._file;
_open_error = other._open_error;