mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-14 15:28:14 +00:00
REVIEWED: TextToPascal()
issue when first char is uppercase
This commit is contained in:
@@ -1676,6 +1676,7 @@ const char *TextToPascal(const char *text)
|
|||||||
{
|
{
|
||||||
// Upper case first character
|
// Upper case first character
|
||||||
if ((text[0] >= 'a') && (text[0] <= 'z')) buffer[0] = text[0] - 32;
|
if ((text[0] >= 'a') && (text[0] <= 'z')) buffer[0] = text[0] - 32;
|
||||||
|
else buffer[0] = text[0];
|
||||||
|
|
||||||
// Check for next separator to upper case another character
|
// Check for next separator to upper case another character
|
||||||
for (int i = 1, j = 1; (i < MAX_TEXT_BUFFER_LENGTH - 1) && (text[j] != '\0'); i++, j++)
|
for (int i = 1, j = 1; (i < MAX_TEXT_BUFFER_LENGTH - 1) && (text[j] != '\0'); i++, j++)
|
||||||
|
Reference in New Issue
Block a user