summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-04-28 20:15:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-04-28 20:15:25 (GMT)
commit9b14115ff2a497439ea56b42c9a81a192067ec58 (patch)
treec24a1d3ff037d50c02b4a4dd9115cd1b118b5311 /src/arch
parentaeffe7a3bc85a2ddf30e309a59f14a0ecb7a824e (diff)
Escaped some characters as needed when building tooltips.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/immediate.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/arch/immediate.c b/src/arch/immediate.c
index 18c798d..88426de 100644
--- a/src/arch/immediate.c
+++ b/src/arch/immediate.c
@@ -1124,7 +1124,22 @@ static char *g_imm_operand_build_tooltip(const GImmOperand *operand, const GLoad
char *conv; /* Affichage de la Conversion */
if (operand->raw <= UCHAR_MAX && isprint(operand->raw))
- asprintf(&result, _("Character: '%c'"), (char)operand->raw);
+ switch (operand->raw)
+ {
+ case '&':
+ asprintf(&result, _("Character: '&amp;'"));
+ break;
+ case '<':
+ asprintf(&result, _("Character: '&lt;'"));
+ break;
+ case '>':
+ asprintf(&result, _("Character: '&gt;'"));
+ break;
+ default:
+ asprintf(&result, _("Character: '%c'"), (char)operand->raw);
+ break;
+ }
+
else
asprintf(&result, _("Character: &lt;not printable&gt;"));