aboutsummaryrefslogtreecommitdiffstats
path: root/util/strgutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/strgutil.c')
-rw-r--r--util/strgutil.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/strgutil.c b/util/strgutil.c
index a8abf7ba8..89722f8e4 100644
--- a/util/strgutil.c
+++ b/util/strgutil.c
@@ -389,7 +389,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;
}
}
@@ -496,3 +497,7 @@ utf8_to_native( const char *string, size_t length )
}
+
+
+
+