From ec9572175fa01c3b50c423b12fad70a73e9b91a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Sun, 12 Feb 2023 22:10:02 +0100 Subject: [PATCH] =?UTF-8?q?Actualizado=20a=20la=20=C3=BAltima=20versi?= =?UTF-8?q?=C3=B3n=20de=20jscore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/common/jscore.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/common/jscore.cpp b/source/common/jscore.cpp index bb9e7cd..c16a494 100644 --- a/source/common/jscore.cpp +++ b/source/common/jscore.cpp @@ -126,9 +126,11 @@ namespace jscore { return score.size(); } string getUserName(const int index) { + if (score.size()==0 || index >= score.size()) return ""; return score[index].name; } const int getPoints(const int index) { + if (score.size()==0 || index >= score.size()) return 0; return score[index].points; }