From fdc57c6f866d50d7c550d8574b24578d7a01784b Mon Sep 17 00:00:00 2001 From: ArcticLampyrid Date: Sun, 28 Apr 2024 18:51:11 +0800 Subject: [PATCH] fix: add `out_of_range` to avoid potential problems --- src/infrastructure/dto/location.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/infrastructure/dto/location.h b/src/infrastructure/dto/location.h index 7c94c62..6df16e3 100644 --- a/src/infrastructure/dto/location.h +++ b/src/infrastructure/dto/location.h @@ -43,6 +43,7 @@ struct DTO_Location { return i.at(index); index -= count; } + throw std::out_of_range("Index out of range"); } };