summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-string.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/core/slang-string.cpp b/source/core/slang-string.cpp
index c02ba048d..dc3c3ed46 100644
--- a/source/core/slang-string.cpp
+++ b/source/core/slang-string.cpp
@@ -373,9 +373,9 @@ namespace Slang
wchar_t* beginData = (wchar_t*)buf.getBuffer();
wchar_t* endData = beginData + length;
- buf.detachBuffer();
-
- return OSString(beginData, endData);
+ OSString ret;
+ ret.set(beginData, endData);
+ return ret;
}
}