diff --git a/.vscode/launch.json b/.vscode/launch.json index cc81732..14711bb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -57,7 +57,7 @@ "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/DGWTextTransmit/dgwtexttransmit", - "args": ["F4FXL B", "-text", "test de julien a nouveau"], + "args": ["F4FXL B", "-file", "${workspaceFolder}/Sandbox/text.txt"],//["F4FXL B", "-text", "test de julien a nouveau"], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], diff --git a/DGWTextTransmit/TextTransmit.cpp b/DGWTextTransmit/TextTransmit.cpp index 9862b1d..26a7e94 100644 --- a/DGWTextTransmit/TextTransmit.cpp +++ b/DGWTextTransmit/TextTransmit.cpp @@ -90,7 +90,7 @@ bool parseCLIArgs(int argc, const char * argv[], std::string& repeater, std::str text.assign(namedArgs["text"]); } else if(namedArgs.count("file") == 1){ - file.assign(namedArgs[file]); + file.assign(namedArgs["file"]); } return true;