From 3d6e5482ecd05801f6adee32467cb8fef00a8264 Mon Sep 17 00:00:00 2001 From: Jan Bachmann <3010330@stud.hs-mannheim.de> Date: Mon, 8 Jan 2024 18:13:30 +0100 Subject: [PATCH] Dateien nach "Axel/src/de/hs_mannheim/informatik/spreadsheet" hochladen --- Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java index d575548..6ba6703 100644 --- a/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java +++ b/Axel/src/de/hs_mannheim/informatik/spreadsheet/Axel.java @@ -91,7 +91,12 @@ public class Axel { form+=command.charAt(i); } } - spr.put(cell, form); + if((spr.getRow(cell)+1)<=spr.cells.length&&(spr.getCol(cell)+1)<=spr.cells[0].length) { + spr.put(cell, form); + } + else { + System.err.println("Zelle '"+ cell+ "' existiert nicht!"); + } }else if(command.matches("stop")){ break; }else if(command.startsWith("save")){