mirror of
https://github.com/raysan5/raylib.git
synced 2026-07-31 04:38:54 +00:00
Fix TextSubtext() returning empty string when position is 0 (#5975)
This commit is contained in:
@@ -1699,7 +1699,7 @@ const char *TextSubtext(const char *text, int position, int length)
|
||||
static char buffer[MAX_TEXT_BUFFER_LENGTH] = { 0 };
|
||||
memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH);
|
||||
|
||||
if ((text != NULL) && (position > 0) && (length > 0))
|
||||
if ((text != NULL) && (position >= 0) && (length > 0))
|
||||
{
|
||||
int textLength = TextLength(text);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user