aboutsummaryrefslogtreecommitdiffstats
path: root/epan/osi-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/osi-utils.c')
-rw-r--r--epan/osi-utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/osi-utils.c b/epan/osi-utils.c
index 81e1a956a6..00632a6e6b 100644
--- a/epan/osi-utils.c
+++ b/epan/osi-utils.c
@@ -188,7 +188,12 @@ print_area_buf(const guint8 *ad, int length, gchar *buf, int buf_len)
g_snprintf(buf, buf_len, "%02x.%02x%02x", ad[0], ad[1], ad[2] );
return;
}
- if ( 4 < length ) {
+ if(length == 4)
+ {
+ g_snprintf(buf, buf_len, "%02x%02x%02x%02x", ad[0], ad[1], ad[2], ad[3] );
+ }
+ if ( 4 < length )
+ {
while ( tmp < length / 4 ) { /* 16/4==4 > four Octets left to print */
cur += g_snprintf(cur, (gulong) (buf_len-(cur-buf)), "%02x", ad[tmp++] );
cur += g_snprintf(cur, (gulong) (buf_len-(cur-buf)), "%02x", ad[tmp++] );