Skip to content

Commit 00084a2

Browse files
committed
Fix: correctly process config strings for --dos encoding
1 parent 135ca41 commit 00084a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

common_func.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ char* str_tolower(const char* str)
7777
char* buf = rsh_strdup(str);
7878
char* p;
7979
if (buf) {
80-
for (p = buf; *p; p++) *p = tolower(*p);
80+
for (p = buf; *p; p++)
81+
if ((0xC0 & (unsigned char)*p) == 0x40)
82+
*p = tolower(*p);
8183
}
8284
return buf;
8385
}

0 commit comments

Comments
 (0)