Browse Source

Trap for parsing floats

hull4
MagicBot 1 year ago
parent
commit
bb433f6f4a
  1. 4
      src/engine/db/handlers/dbBuildingHandler.java

4
src/engine/db/handlers/dbBuildingHandler.java

@ -566,8 +566,12 @@ public class dbBuildingHandler extends dbHandlerBase {
String[] vertStrings = rs.getString("vertices").split(";"); String[] vertStrings = rs.getString("vertices").split(";");
ArrayList<Vector2f> vertArrayList = new ArrayList<>(); ArrayList<Vector2f> vertArrayList = new ArrayList<>();
try {
for (int i = 0; i < vertStrings.length; i += 2) for (int i = 0; i < vertStrings.length; i += 2)
vertArrayList.add(new Vector2f(Float.parseFloat(vertStrings[i]), Float.parseFloat(vertStrings[1 + 1]))); vertArrayList.add(new Vector2f(Float.parseFloat(vertStrings[i]), Float.parseFloat(vertStrings[1 + 1])));
} catch (Exception e) {
Logger.error("propID: " + propID);
}
ArrayList<ArrayList<Vector2f>> meshList; ArrayList<ArrayList<Vector2f>> meshList;

Loading…
Cancel
Save