فهرست منبع

fix a bug that creates an infinite loop if we kick a lookup from an intrinsic type.
For instance "?Texture2D" as scope, and "Load" as method will end up in a "LevelUp" that isn't "/" but is "". The empty path was never never meant to be a possible output of LevelUp function, but it does happen in case of levelup from non rooted symbols.

Signed-off-by: Vivien Oddou <[email protected]>

Vivien Oddou 2 سال پیش
والد
کامیت
d87a18e4a2
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/AzslcSymbolAggregator.cpp

+ 1 - 1
src/AzslcSymbolAggregator.cpp

@@ -140,7 +140,7 @@ namespace AZ::ShaderCompiler
         {
             auto attempt = QualifiedName{JoinPath(path, name)};
             got = GetIdAndKindInfo(attempt);
-            exit = path == "/";
+            exit = path == "/" || path.empty();
             if (!got)
             {
                 if (auto* scopeAsClass = GetAsSub<ClassInfo>(IdentifierUID{GetParentName(attempt)})) // get enclosing class