diff options
Diffstat (limited to 'src/analysis/scan/items/console')
-rw-r--r-- | src/analysis/scan/items/console/log.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/analysis/scan/items/console/log.c b/src/analysis/scan/items/console/log.c index f4031c7..02b6207 100644 --- a/src/analysis/scan/items/console/log.c +++ b/src/analysis/scan/items/console/log.c @@ -228,8 +228,8 @@ static bool g_scan_console_log_function_run_call(GScanConsoleLogFunction *item, { bool result; /* Bilan à retourner */ size_t i; /* Boucle de parcours #1 */ - LiteralValueType vtype; /* Type de valeur portée */ GScanLiteralExpression *literal; /* Version plus accessible */ + LiteralValueType vtype; /* Type de valeur portée */ bool boolean; /* Valeur booléenne */ long long sinteger; /* Valeur entière signée */ unsigned long long uinteger; /* Valeur entière non signée */ @@ -275,13 +275,14 @@ static bool g_scan_console_log_function_run_call(GScanConsoleLogFunction *item, case LVT_STRING: result = g_scan_literal_expression_get_string_value(literal, &string); - for (k = 0; k < string->len; k++) - { - if (isprint(string->data[k])) - fprintf(stderr, "%c", string->data[k]); - else - fprintf(stderr, "\\x%02hhx", string->data[k]); - } + if (result) + for (k = 0; k < string->len; k++) + { + if (isprint(string->data[k])) + fprintf(stderr, "%c", string->data[k]); + else + fprintf(stderr, "\\x%02hhx", string->data[k]); + } break; default: |