From 6aca3813c4ccc496c0f9b2db293acb546aa11d2d Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 1 Nov 2023 21:42:12 -0700 Subject: Parameter binding and gfx fixes. (#3302) * Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He --- source/slang/slang-workspace-version.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/slang/slang-workspace-version.cpp') diff --git a/source/slang/slang-workspace-version.cpp b/source/slang/slang-workspace-version.cpp index ed568b470..86cdd000a 100644 --- a/source/slang/slang-workspace-version.cpp +++ b/source/slang/slang-workspace-version.cpp @@ -451,6 +451,9 @@ UnownedStringSlice DocumentVersion::peekIdentifier(Index& offset) { Index start = offset; Index end = offset; + if (start >= text.getLength()) + return UnownedStringSlice(""); + while (start >= 0 && _isIdentifierChar(text[start])) start--; while (end < text.getLength() && _isIdentifierChar(text[end])) -- cgit v1.2.3