diff options
| -rw-r--r-- | source/slang/slang-reflection-api.cpp | 4 | ||||
| -rw-r--r-- | tools/slang-unit-test/unit-test-attribute-reflection.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-reflection-api.cpp b/source/slang/slang-reflection-api.cpp index 5dfa9d55a..065c2c3f6 100644 --- a/source/slang/slang-reflection-api.cpp +++ b/source/slang/slang-reflection-api.cpp @@ -378,8 +378,8 @@ SLANG_API const char* spReflectionUserAttribute_GetArgumentValueString( if (auto cexpr = as<StringLiteralExpr>(userAttr->args[index])) { if (bufLen) - *bufLen = cexpr->token.getContentLength(); - return cexpr->token.getContent().begin(); + *bufLen = cexpr->value.getLength(); + return cexpr->value.getBuffer(); } return nullptr; } diff --git a/tools/slang-unit-test/unit-test-attribute-reflection.cpp b/tools/slang-unit-test/unit-test-attribute-reflection.cpp index 7a4758677..d0ef59f9e 100644 --- a/tools/slang-unit-test/unit-test-attribute-reflection.cpp +++ b/tools/slang-unit-test/unit-test-attribute-reflection.cpp @@ -66,7 +66,7 @@ SLANG_UNIT_TEST(attributeReflection) size_t size = 0; auto guid = comAttribute->getArgumentValueString(0, &size); UnownedStringSlice stringSlice = UnownedStringSlice(guid, size); - SLANG_CHECK(stringSlice == "\"042BE50B-CB01-4DBB-8367-3A9CDCBE2F49\""); + SLANG_CHECK(stringSlice == "042BE50B-CB01-4DBB-8367-3A9CDCBE2F49"); auto testType = reflection->findTypeByName("TS"); SLANG_CHECK(testType != nullptr); |
