diff options
Diffstat (limited to 'source/lib/substitute.c')
-rw-r--r-- | source/lib/substitute.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/lib/substitute.c b/source/lib/substitute.c index e6c34d124f8..95393a94ede 100644 --- a/source/lib/substitute.c +++ b/source/lib/substitute.c @@ -202,15 +202,11 @@ void standard_sub_basic(char *str, int len) if (*local_machine) string_sub(p,"%L", local_machine,l); else { - char *ns = p; - - string_sub(p,"%L", global_myname,l); - while (*ns) - { - if (isupper(*ns)) - *ns = tolower(*ns); - ns++; - } + pstring temp_name; + + pstrcpy(temp_name, global_myname); + strlower(temp_name); + string_sub(p,"%L", temp_name,l); } break; case 'M' : string_sub(p,"%M", client_name(),l); break; |