diff --git a/LICENSE b/LICENSE index 0e19085c8..d13cc4b26 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,5 @@ The MIT License (MIT) -Copyright (c) 2016 jwellbelove, https://github.com/ETLCPP/etl, http://www.etlcpp.com - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights diff --git a/include/etl/optional.h b/include/etl/optional.h index d85763d25..6431efb58 100644 --- a/include/etl/optional.h +++ b/include/etl/optional.h @@ -768,7 +768,10 @@ namespace etl { if (this != &other) { - storage.value = other.storage.value; + if (other.valid) + { + storage.value = other.storage.value; + } valid = other.valid; } @@ -783,7 +786,10 @@ namespace etl { if (this != &other) { - storage.value = etl::move(other.storage.value); + if (other.valid) + { + storage.value = etl::move(other.storage.value); + } valid = other.valid; }