Skip to content
Snippets Groups Projects
Commit 81e121f6 authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[interpreter] using sprintf is deprecated.

parent a2af6ec2
No related branches found
No related tags found
No related merge requests found
...@@ -247,9 +247,9 @@ void Interpreter::runMain(void) { ...@@ -247,9 +247,9 @@ void Interpreter::runMain(void) {
std::string Interpreter::processStream(std::istream& stream, std::ostream& os) { std::string Interpreter::processStream(std::istream& stream, std::ostream& os) {
char line[10000]; char line[10000];
sprintf(line, "%s", "\n");
std::string command;
std::streamsize maxSize = 10000; std::streamsize maxSize = 10000;
snprintf(line, static_cast<size_t>(maxSize), "%s", "\n");
std::string command;
#if 0 #if 0
while (line != std::string("")) { while (line != std::string("")) {
stream.getline(line, maxSize, '\n'); stream.getline(line, maxSize, '\n');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment