diff options
Diffstat (limited to 'mysys/mf_pack.c')
-rw-r--r-- | mysys/mf_pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c index bed9968063a..d4828946d82 100644 --- a/mysys/mf_pack.c +++ b/mysys/mf_pack.c @@ -354,7 +354,7 @@ size_t unpack_dirname(char * to, const char *from) length-= (size_t) (suffix-buff)-1; if (length+(h_length= strlen(tilde_expansion)) <= FN_REFLEN) { - if (tilde_expansion[h_length-1] == FN_LIBCHAR) + if ((h_length > 0) && (tilde_expansion[h_length-1] == FN_LIBCHAR)) h_length--; if (buff+h_length < suffix) bmove(buff+h_length,suffix,length); |