Skip to content

Commit 61ce3df

Browse files
committed
xrCore: fix linux xr_strlwr
1 parent 8f0a17d commit 61ce3df

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/xrCore/xrstring.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ IC void xr_strlwr(shared_str& src)
206206
int i = 0;
207207
while(lp[i])
208208
{
209-
lp[i] = (char) std::toupper(lp[i], std::locale());
209+
lp[i] = (char) std::tolower(lp[i], std::locale());
210210
i++;
211211
}
212212
#endif
@@ -217,13 +217,7 @@ IC void xr_strlwr(shared_str& src)
217217

218218
IC char * xr_strlwr(char * src)
219219
{
220-
int i = 0;
221-
while(src[i])
222-
{
223-
src[i] = (char) toupper(src[i]);// TODO rewrite locale-independent toupper_l()
224-
i++;
225-
}
226-
return src;
220+
return SDL_strlwr(src);
227221
}
228222

229223
#pragma pack(pop)

0 commit comments

Comments
 (0)