summaryrefslogtreecommitdiff
path: root/epan/osi-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/osi-utils.c')
-rw-r--r--epan/osi-utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/osi-utils.c b/epan/osi-utils.c
index 79ecb2d8e4..b7a00605ef 100644
--- a/epan/osi-utils.c
+++ b/epan/osi-utils.c
@@ -118,7 +118,8 @@ print_system_id_buf( const guint8 *ad, int length, gchar *buf, int buf_len)
cur += g_snprintf(cur, buf_len-(cur-buf), "%02x.", ad[tmp++] );
}
if ( 1 == tmp ) { /* Special case for Designated IS */
- g_snprintf(--cur, buf_len-(cur-buf), ".%02x", ad[tmp] );
+ cur--;
+ g_snprintf(cur, buf_len-(cur-buf), ".%02x", ad[tmp] );
}
else {
for ( ; tmp < length; ) { /* print the rest without dot */
@@ -188,7 +189,8 @@ print_area_buf(const guint8 *ad, int length, gchar *buf, int buf_len)
cur += g_snprintf(cur, buf_len-(cur-buf), "%02x.", ad[tmp++] );
}
if ( 1 == tmp ) { /* Special case for Designated IS */
- g_snprintf(--cur, buf_len-(cur-buf), "-%02x", ad[tmp] );
+ cur--;
+ g_snprintf(cur, buf_len-(cur-buf), "-%02x", ad[tmp] );
}
else {
for ( ; tmp < length; ) { /* print the rest without dot */