Fixed bug where an error would occur with two parameters with rectangle

This commit is contained in:
Lukasz Baldyga committed 2020-11-30 09:29:12 +00:00
1 parent 3623ddcbfa
commit 17b05c827a
1 file changed
+1 -1
@@ -113,7 +113,7 @@ namespace Advanced_Software_Engineering {
case "rectangle": case "rectangle":
//Check parameters //Check parameters
if (parameterLength == 2) { if (parameterLength == 2) {
return new Rectangle(drawer, parameters[0], parameters[2]); return new Rectangle(drawer, parameters[0], parameters[1]);
} else if (parameterLength == 8) { } else if (parameterLength == 8) {
return new Quadrilateral(drawer, return new Quadrilateral(drawer,
new PointValue(parameters[0], parameters[1]), new PointValue(parameters[0], parameters[1]),