-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rtext] LoadFont()
somehow distorts the memory of TextSplit()
#4704
Comments
Loadfont()
somehow distorts the memory of TextSplit()
Loadfont()
somehow distorts the memory of TextSplit()
LoadFont()
somehow distorts the memory of TextSplit()
@AnkurMal Interesting issue... not sure what could be the cause... @asdqwe Just reviewed the implementation of |
@asdqwe Oh! I see it now! Ok, that's a design decision, raylib is intended for "immediate-mode" usage of text data (get-use-discard) moving the No plans to redesign the function to support other behaviour but I'm adding some extra documentation on |
Issue description
Essentially, the array of strings (splits) returned by
TextSplit()
, gets "garbage" value after I use it after loading a font usingLoadFont()
.Environment
HP 15s, Windows 11 24H2, Intel iRIS Xe
Code Example
here, if I put the line
for(int i=0; i<count; i++) printf("%s\n", spl[i]);
beforeFont font = LoadFont("assets/font/font.ttf");
, it prints the output as it should be, i,e,But if I put it after that, it produces garbage:
The text was updated successfully, but these errors were encountered: