mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-04-18 00:27:04 -04:00
fix: JVM arguments getting newlines inside it when pasting
When you paste a string with newlines in it, it literally puts newlines here, then parsing it goes all wonky because of that. Never trust user input
This commit is contained in:
@@ -246,7 +246,9 @@ public class ProfileEditorFragment extends Fragment implements CropperUtils.Crop
|
||||
mTempProfile.lastVersionId = mDefaultVersion.getText().toString();
|
||||
mTempProfile.controlFile = mDefaultControl.getText().toString();
|
||||
mTempProfile.name = mDefaultName.getText().toString();
|
||||
mTempProfile.javaArgs = mDefaultJvmArgument.getText().toString();
|
||||
mTempProfile.javaArgs = mDefaultJvmArgument.getText().toString()
|
||||
.replaceAll("[\r\n]+", " ")
|
||||
.trim();
|
||||
mTempProfile.gameDir = mDefaultPath.getText().toString();
|
||||
|
||||
if(mTempProfile.controlFile.isEmpty()) mTempProfile.controlFile = null;
|
||||
|
||||
Reference in New Issue
Block a user