Skip to content

Commit d6c3543

Browse files
committed
Revert "xrCore: fix linux xr_strlwr"
This reverts commit 61ce3df.
1 parent 1d111bc commit d6c3543

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/xrCore/xrstring.h

Lines changed: 8 additions & 2 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::tolower(lp[i], std::locale());
209+
lp[i] = (char) std::toupper(lp[i], std::locale());
210210
i++;
211211
}
212212
#endif
@@ -217,7 +217,13 @@ IC void xr_strlwr(shared_str& src)
217217

218218
IC char * xr_strlwr(char * src)
219219
{
220-
return SDL_strlwr(src);
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;
221227
}
222228

223229
#pragma pack(pop)

0 commit comments

Comments
 (0)