From a1901a725d11ba397725c3b04a84922509aadf84 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Thu, 13 Jun 2024 14:03:23 +0200 Subject: [PATCH] =?UTF-8?q?-=20[FIX]=20Si=20es=20demana=20un=20nombre=20d'?= =?UTF-8?q?habitaci=C3=B3=20invalid,=20simplement=20no=20fem=20res?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/room.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/room.cpp b/source/room.cpp index f7b08b6..35b9b22 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -96,9 +96,9 @@ namespace room //void load(int x, int y, int8_t xp, int8_t xn, int8_t yp, int8_t yn, uint8_t col, uint8_t floor, uint8_t walls, uint8_t door, uint8_t walldoor) void load(const int room) { - if (modified && ::editor::isEditing()) editor::save(); + if (room > 64 || room < 0) { return; } - if (room > 64) { perror("ERROR: Nombre d'habitació massa gran! Eixint..."); exit(1); } + if (modified && ::editor::isEditing()) editor::save(); actor::actor_t *sel = actor::getSelected(); char selected_actor_name[16]; selected_actor_name[0] = 0;