Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit dc12a97

Browse files
committed
fix enum struct char fields with constant sizes
1 parent 536e604 commit dc12a97

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SourcepawnCondenser/SourcepawnCondenser/CondenserFunctions/SMEnumStructConsumer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ private int ConsumeSMEnumStruct()
232232
{
233233
if (_tokens[j].Kind == TokenKind.Identifier && !InPureSemicolonSearch)
234234
{
235+
// Don't take constant sizes as the field name
236+
if (_tokens[j - 1].Kind == TokenKind.BracketOpen)
237+
{
238+
continue;
239+
}
235240
fieldName = _tokens[j].Value;
236241
continue;
237242
}

0 commit comments

Comments
 (0)