From e57c5c93591fa062fa879bd61cfd13d2b104b529 Mon Sep 17 00:00:00 2001 From: mikee47 Date: Wed, 3 Jul 2024 14:42:17 +0100 Subject: [PATCH] Fix `Stat` self-assignment problem --- src/include/IFS/Stat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/include/IFS/Stat.h b/src/include/IFS/Stat.h index 7926943..910caa7 100644 --- a/src/include/IFS/Stat.h +++ b/src/include/IFS/Stat.h @@ -72,6 +72,9 @@ struct Stat { */ Stat& operator=(const Stat& rhs) { + if(this == &rhs) { + return *this; + } fs = rhs.fs; name.copy(rhs.name); size = rhs.size;