Skip to content

Commit b9b613c

Browse files
committed
Fix variable name getting truncated even when it is constant
1 parent 71bbbdb commit b9b613c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FanScript/Compiler/Symbols/Variables/VariableSymbol.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public string ResultName
2929
preChar = "$";
3030

3131
string name = getNameForResult();
32-
return string.Concat(preChar, name.AsSpan(0, Math.Min(name.Length, FancadeConstants.MaxVariableNameLength - preChar.Length)));
32+
return string.Concat(preChar, Modifiers.HasFlag(Modifiers.Constant) ? name : name.AsSpan(0, Math.Min(name.Length, FancadeConstants.MaxVariableNameLength - preChar.Length)));
3333
}
3434
}
3535
protected virtual string getNameForResult()

0 commit comments

Comments
 (0)