aboutsummaryrefslogtreecommitdiffstats
path: root/util/strgutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/strgutil.c')
-rw-r--r--util/strgutil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/strgutil.c b/util/strgutil.c
index 861bf0d6b..1308bb0af 100644
--- a/util/strgutil.c
+++ b/util/strgutil.c
@@ -424,7 +424,8 @@ utf8_to_native( const char *string, size_t length )
case 0 : n++; if( p ) *p++ = '0'; break;
default: n += 3;
sprintf( p, "x%02x", *s );
- p += 3;
+ if ( p )
+ p += 3;
break;
}
}