mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 14:19:19 +01:00
missing categories are correctly saved in binary
This commit is contained in:
@@ -1165,7 +1165,12 @@ public class Table {
|
||||
output.writeDouble(row.getDouble(col));
|
||||
break;
|
||||
case CATEGORY:
|
||||
output.writeInt(columnCategories[col].index(row.getString(col)));
|
||||
String peace = row.getString(col);
|
||||
if (peace.equals(missingString)) {
|
||||
output.writeInt(missingCategory);
|
||||
} else {
|
||||
output.writeInt(columnCategories[col].index(peace));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -4140,7 +4145,12 @@ public class Table {
|
||||
}
|
||||
break;
|
||||
case CATEGORY:
|
||||
output.writeInt(columnCategories[col].index(pieces[col]));
|
||||
String peace = pieces[col];
|
||||
if (peace.equals(missingString)) {
|
||||
output.writeInt(missingCategory);
|
||||
} else {
|
||||
output.writeInt(columnCategories[col].index(peace));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user