2
0
Эх сурвалжийг харах

Fix GuiTextSplit overrunning on max split count (#450)

Co-authored-by: segcore <[email protected]>
segcore 7 сар өмнө
parent
commit
31b6ca3ccc
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      src/raygui.h

+ 1 - 1
src/raygui.h

@@ -5269,7 +5269,7 @@ static const char **GuiTextSplit(const char *text, char delimiter, int *count, i
             buffer[i] = '\0';   // Set an end of string at this point
 
             counter++;
-            if (counter > RAYGUI_TEXTSPLIT_MAX_ITEMS) break;
+            if (counter >= RAYGUI_TEXTSPLIT_MAX_ITEMS) break;
         }
     }