Skip to content

Commit

Permalink
Remove empty entries when splitting .obj lines
Browse files Browse the repository at this point in the history
Some programs would put an additional space after the "v" character,
causing ObjModel to crash the entire game when parsing an .obj file.
  • Loading branch information
SnipUndercover committed Apr 21, 2024
1 parent c735065 commit 7026ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Celeste.Mod.mm/Patches/ObjModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static ObjModel CreateFromStream(Stream stream, string fname) {
using (StreamReader streamReader = new StreamReader(stream)) {
string text;
while ((text = streamReader.ReadLine()) != null) {
string[] array = text.Split(' ');
string[] array = text.Split(' ', StringSplitOptions.RemoveEmptyEntries);
if (array.Length != 0) {
string a = array[0];
if (a == "o") {
Expand Down

0 comments on commit 7026ad2

Please sign in to comment.