Skip to content
Snippets Groups Projects
Commit 23c36147 authored by Oliver Heidmann's avatar Oliver Heidmann Committed by Uwe Schulzweida
Browse files

added missing c_str()

parent d4e71503
No related branches found
No related tags found
2 merge requests!326convert_to_number not called string_to_number, fixed usage of .fail enabling...,!322Fixing and cleaning up handling of operator argument sourrounding the use of scientific notations
......@@ -111,7 +111,7 @@ _set_magics_parameter_value(const char *, const char *, const char *)
{
int ret_flag = 0;
#ifdef HAVE_LIBMAGICS
std::string sep_char = ',';
std::string sep_char = ",";
const char search_char = ';';
if (param_name == nullptr)
......@@ -203,15 +203,15 @@ _set_magics_parameter_value(const char *, const char *, const char *)
// MAGICS++ STRINGARRAY TYPE PARAMETERS
else if (cdo_cmpstr(param_type, "stringarray"))
{
if (DBG) fprintf(stderr, "Input strarr is %s Sep char is %c Search char is %c\n", param_value, sep_char, search_char);
if (DBG) fprintf(stderr, "Input strarr is %s Sep char is %c Search char is %c\n", param_value, sep_char.c_str(), search_char);
if (std::strstr(param_value, ";")) sep_char = ';';
if (DBG) fprintf(stderr, "Input strarr is %s Sep char is %c\n", param_value, sep_char);
if (DBG) fprintf(stderr, "Input strarr is %s Sep char is %c\n", param_value, sep_char.c_str();
const auto splitStrings = split_string(param_value, sep_char);
if (DBG)
fprintf(stderr, "Input strarr is %s split str count is %d Sep char is %c\n", param_value, (int) splitStrings.size(),
sep_char);
sep_char.c_str());
const char **split_str = (const char **) malloc(splitStrings.size() * sizeof(char *));
for (size_t k = 0, n = splitStrings.size(); k < n; ++k) split_str[k] = splitStrings[k].c_str();
......
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