blueloveTH 3 år sedan
förälder
incheckning
8f29dcbca7
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/vm.h

+ 2 - 2
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);
         }
     }