summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libxt_string.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/extensions/libxt_string.c b/extensions/libxt_string.c
index 257f5f85..365019f7 100644
--- a/extensions/libxt_string.c
+++ b/extensions/libxt_string.c
@@ -230,13 +230,8 @@ print_hex_string(const char *str, const unsigned short int len)
unsigned int i;
/* start hex block */
printf(" \"|");
- for (i=0; i < len; i++) {
- /* see if we need to prepend a zero */
- if ((unsigned char) str[i] <= 0x0F)
- printf("0%x", (unsigned char) str[i]);
- else
- printf("%x", (unsigned char) str[i]);
- }
+ for (i=0; i < len; i++)
+ printf("%02x", (unsigned char)str[i]);
/* close hex block */
printf("|\"");
}