mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
strdup
This commit is contained in:
parent
731f6fc322
commit
eb4573b06c
3 changed files with 21 additions and 11 deletions
|
@ -10,9 +10,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "proxmark3.h"
|
||||
#include <limits.h>
|
||||
#include <stdio.h> // for Mingw readline
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h> // for Mingw readline
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
|
@ -27,7 +28,6 @@
|
|||
#include "fileutils.h"
|
||||
#include "flash.h"
|
||||
|
||||
|
||||
static void showBanner(void) {
|
||||
g_printAndLog = PRINTANDLOG_PRINT;
|
||||
|
||||
|
@ -169,13 +169,16 @@ check_script:
|
|||
// remove linebreaks
|
||||
strcleanrn(script_cmd_buf, sizeof(script_cmd_buf));
|
||||
|
||||
if ((cmd = strmcopy(script_cmd_buf)) != NULL)
|
||||
cmd = strdup(script_cmd_buf);
|
||||
if (cmd != NULL)
|
||||
printprompt = true;
|
||||
}
|
||||
} else {
|
||||
// If there is a script command
|
||||
if (execCommand) {
|
||||
if ((cmd = strmcopy(script_cmd)) != NULL)
|
||||
|
||||
cmd = strdup(script_cmd);
|
||||
if (cmd != NULL)
|
||||
printprompt = true;
|
||||
|
||||
uint16_t len = strlen(script_cmd) + 1;
|
||||
|
@ -203,7 +206,8 @@ check_script:
|
|||
// remove linebreaks
|
||||
strcleanrn(script_cmd_buf, sizeof(script_cmd_buf));
|
||||
|
||||
if ((cmd = strmcopy(script_cmd_buf)) != NULL)
|
||||
cmd = strdup(script_cmd_buf);
|
||||
if (cmd != NULL)
|
||||
printprompt = true;
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue