From d112289d0d86e66286641a4a1cd450c7db97f5b7 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 6 May 2022 11:36:51 +0300 Subject: Autocommit at 06.05.2022 @ 11:36 --- src/VenueConsoleUI.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/VenueConsoleUI.cpp') diff --git a/src/VenueConsoleUI.cpp b/src/VenueConsoleUI.cpp index fdac1bc..af02425 100644 --- a/src/VenueConsoleUI.cpp +++ b/src/VenueConsoleUI.cpp @@ -51,8 +51,8 @@ void command_freeSeats() { unsigned tableSize = hall->get_rowCount() * hall->get_seatsPerRow(); char tableData[tableSize + 1]; - for (unsigned ind = 0, row = 1; row < hall->get_rowCount(); row++) { - for (unsigned seat = 1; seat < hall->get_seatsPerRow(); seat++, ind++) { + for (unsigned ind = 0, row = 1; row <= hall->get_rowCount(); row++) { + for (unsigned seat = 1; seat <= hall->get_seatsPerRow(); seat++, ind++) { if (tickets.contain(Ticket(row, seat))) tableData[ind] = 'B'; else if (reservations.contain(Ticket(row, seat))) @@ -71,12 +71,12 @@ void command_reserveTicket() { inputLineBox("Enter event name: ", name, MAX_LINE_WIDTH); Date date; inputBox("Enter event date: ", &date); + Ticket tic; + inputBox("Enter row and seat: ", &tic); char password[PASSWORD_LEN]; inputBox("Enter password [Max 8 characters]: ", &password); char note[NOTE_LEN]; inputBox("Enter note [Max 32 characters]: ", ¬e); - Ticket tic; - inputBox("Enter row and seat: ", &tic); handleStatusCode(v->get_es().reserveTicket(name, date, password, note, tic), ticketManagementMenu); } -- cgit v1.3.1-23-gd82d