From e0eddc91d0cd2bef980f011310f8addfa0723439 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 15 Feb 2025 21:39:01 +0100 Subject: Fix self-reference check in File::operator= --- src/file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3