From 3dc6a554d73d10cbf5decd39b636a34abc514a66 Mon Sep 17 00:00:00 2001 From: Louis Moureaux Date: Sun, 24 Dec 2023 02:14:52 +0100 Subject: [PATCH] Don't use array new to create vision sites Coverity CID 1528899. Closes #2071. --- common/vision.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/vision.cpp b/common/vision.cpp index 33add6c348..c249ecdba3 100644 --- a/common/vision.cpp +++ b/common/vision.cpp @@ -67,7 +67,7 @@ bool vision_reveal_tiles(struct vision *vision, bool reveal_tiles) struct vision_site *vision_site_new(int identity, struct tile *location, struct player *owner) { - vision_site *psite = new vision_site[1](); + vision_site *psite = new vision_site(); psite->identity = identity; psite->location = location;