Skip to content

Commit 1a5c101

Browse files
Fix
1 parent ffd002a commit 1a5c101

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/java/golanganalyzerextension/datatype/GolangDatatype.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ public StructureDataType get_struct_datatype() {
195195
return (StructureDataType)datatype;
196196
}
197197
StructureDataType struct_datatype=new StructureDataType(name, 0);
198-
struct_datatype.add(datatype);
198+
if(datatype.getLength()!=0) {
199+
struct_datatype.add(datatype);
200+
}
199201
return struct_datatype;
200202
}
201203

src/main/java/golanganalyzerextension/datatype/GolangDatatypeRecord.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ public Structure get_struct() {
133133
return (Structure)datatype;
134134
}
135135
StructureDataType struct_datatype=new StructureDataType(name, 0);
136-
struct_datatype.add(datatype);
136+
if(datatype.getLength()!=0) {
137+
struct_datatype.add(datatype);
138+
}
137139
return struct_datatype;
138140
}
139141

0 commit comments

Comments
 (0)