From 81e121f6b9017de2b9051e5dce29bd98a47147e3 Mon Sep 17 00:00:00 2001 From: Olivier Stasse <olivier.stasse@laas.fr> Date: Tue, 24 Oct 2023 14:54:39 +0200 Subject: [PATCH] [interpreter] using sprintf is deprecated. --- src/interpreter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interpreter.cc b/src/interpreter.cc index f80dbb1..97fcbe0 100644 --- a/src/interpreter.cc +++ b/src/interpreter.cc @@ -247,9 +247,9 @@ void Interpreter::runMain(void) { std::string Interpreter::processStream(std::istream& stream, std::ostream& os) { char line[10000]; - sprintf(line, "%s", "\n"); - std::string command; std::streamsize maxSize = 10000; + snprintf(line, static_cast<size_t>(maxSize), "%s", "\n"); + std::string command; #if 0 while (line != std::string("")) { stream.getline(line, maxSize, '\n'); -- GitLab