1
0
Fork 0

fix console double click crash

This commit is contained in:
Sen 2025-08-25 21:46:47 +02:00
parent 1e5b2995af
commit 743afbed6d
Signed by: sen
GPG key ID: 3AC50A6F47D1B722

View file

@ -40,7 +40,7 @@ public class GuiConsole extends Gui implements FieldCallback {
protected void onDoubleClick() { protected void onDoubleClick() {
if(this.sel_start >= 0 && this.sel_end == this.sel_start) { if(this.sel_start >= 0 && this.sel_end == this.sel_start) {
for(int z = this.sel_start; z >= 0; z--) { for(int z = this.sel_start - 1; z >= 0; z--) {
char c = this.text.charAt(z); char c = this.text.charAt(z);
if(c == Color.COMMAND) { if(c == Color.COMMAND) {
for(int n = z + 1; n < this.text.length(); n++) { for(int n = z + 1; n < this.text.length(); n++) {