diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-09-12 04:43:02 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-09-12 04:45:25 (GMT) |
commit | fed4c10b9bb1c6f99440dba3839a1e7b56b40359 (patch) | |
tree | d544bde345c16a5eff19c0f9a074c09b366f7dbe /src/analysis/scan/items/console | |
parent | 155c500b8933d2c7269215ea1d141d341de0a44f (diff) |
Save current state with some ROST extra features.
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: |