From 8f29dcbca7c9948383ac9a02a09c36a1509f4651 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 28 Nov 2022 21:43:10 +0800 Subject: [PATCH] fix a bug --- src/vm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm.h b/src/vm.h index 5c537147..090d7352 100644 --- a/src/vm.h +++ b/src/vm.h @@ -1097,7 +1097,7 @@ public: } std::optional<_Str> readSharedStr(){ - std::optional<_Str> copy = _sharedStr.value(); + std::optional<_Str> copy = _sharedStr; _sharedStr = {}; return copy; } @@ -1114,7 +1114,7 @@ public: if(value == nullptr){ _sharedStr = {}; }else{ - _sharedStr = value; + _sharedStr = _Str(value); } }