[*] Fix AuByteBuffer writes of AuOptionals

This commit is contained in:
Reece Wilson 2024-03-17 20:22:43 +00:00
parent c3cb380eca
commit f0248ed658

View File

@ -192,7 +192,7 @@ namespace Aurora::Memory
}
else
{
out = T { AuMove(value) };
out = AuMove(T { AuMove(value) });
return true;
}
}
@ -392,7 +392,10 @@ namespace Aurora::Memory
else if constexpr (AuIsOptional_v<AuRemoveReference_t<T>>)
{
Write<bool>(AuStaticCast<bool>(in));
WriteTagged(in.value());
if (AuStaticCast<bool>(in))
{
WriteTagged(in.value());
}
return !this->flagWriteError;
}
else if constexpr (AuIsBaseOfTemplate<AURORA_RUNTIME_AU_LIST, AuRemoveReference_t<T>>::value)